Swap

Latest version: v0.5.0

Safety actively analyzes 620930 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.5.0

New
- Add Normal `transaction`, `solver` and `signature` for all blockchain providers including `ERC20` and `XRC20` token standards.

- Add [Ethereum](https://github.com/ethereum/go-ethereum) Hash Time Lock Contract `HTLC-ERC20` token standard protocol.

| Network | HTLC Contract Addresses | HTLC ERC20 Contract Addresses |
| -------------- | :---------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: |
| Mainnet | None | None |
| Ropsten | [0x0cc7C744f96729B7f60B12B36A4B9504191CD458](https://ropsten.etherscan.io/address/0x0cc7C744f96729B7f60B12B36A4B9504191CD458) | [0x761c47A8dc8178d55aE14b661abf26cc0B599bc6](https://ropsten.etherscan.io/address/0x761c47A8dc8178d55aE14b661abf26cc0B599bc6) |
| Kovan | [0xf3c7CD43F2f87958E708E00780EBDf87292Ad37E](https://kovan.etherscan.io/address/0xf3c7CD43F2f87958E708E00780EBDf87292Ad37E) | [0x32a05649778bc96958bF804835C9e8eC9678e283](https://kovan.etherscan.io/address/0x32a05649778bc96958bF804835C9e8eC9678e283) |
| Rinkeby | [0xB00370e1F88C86Ef6Fc81B380E0c7fC1dcbceD17](https://rinkeby.etherscan.io/address/0xB00370e1F88C86Ef6Fc81B380E0c7fC1dcbceD17) | [0xe0d3155c9DC0ADdCDA71E7ef15c689AeCC8Dfc28](https://rinkeby.etherscan.io/address/0xe0d3155c9DC0ADdCDA71E7ef15c689AeCC8Dfc28) |
| Testnet | None | None |

- Add [XinFin](https://github.com/XinFinOrg/XDPoSChain) Hash Time Lock Contract `HTLC-XRC20` token standards protocol.

| Network | HTLC Contract Addresses | HTLC XRC20 Contract Addresses |
| -------------- | :---------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: |
| Mainnet | [xdc1C2F24F4E2427aD43df9c20521B88C78A32Bafb2](https://explorer.xinfin.network/address/xdc1C2F24F4E2427aD43df9c20521B88C78A32Bafb2) | [xdcC8E8De7999D74bdD71e1cDC00025867F34c50b89](https://explorer.xinfin.network/address/xdcC8E8De7999D74bdD71e1cDC00025867F34c50b89) |
| Apothem | [xdc959c04329fa6B45d0250A2315673e4F952218BdE](https://explorer.apothem.network/address/xdc959c04329fa6B45d0250A2315673e4F952218BdE) | [xdc4C909fdd6c30f5B4c4d48938C161637B2767d714](https://explorer.apothem.network/address/xdc4C909fdd6c30f5B4c4d48938C161637B2767d714) |
| Testnet | None | None |

- Add `wallet.erc20_balance`, `rpc.get_erc20_balance`, `rpc.get_erc20_decimals`, and `utils.get_erc20_data` functions on Ethereum provider.
- Add `wallet.xrc20_balance`, `rpc.get_xrc20_balance`, `rpc.get_xrc20_decimals`, and `utils.get_xrc20_data` functions on XinFin provider.


Improvements
- Drop `from_root_xprivate_key` function from Bitcoin, Ethereum and XinFin wallets.
- Upgrade Solidity compiler of Ethereum and XinFin HTLC's Smart contract scripts to the latest v0.8.10 `solc` package.
- Change `decode_raw` and `submit_raw` functions transaction_raw param to raw of Ethereum and XinFin providers.

Dependencies
- Bump Web3 from v5.19.0 to v5.25.0 package.
- Bump Py-Solc-X from v1.1.0 to x1.1.1 package
- Bump HDWallet from v1.3.1 to v2.0.1 package.

0.4.2a3

0.4.1

New
- Add XinFin Testnet (Apothem) network.

New/Updated HTLC Contract Addresses
- Ethereum

| Network | Contract Addresses |
| -------------- | :---------------------------------------------------------: |
| Mainnet | None |
| Ropsten | 0xE5cb615899436A490dBde26d7880A0C2502Fc676 |
| Kovan | 0xB00370e1F88C86Ef6Fc81B380E0c7fC1dcbceD17 |
| Rinkeby | 0x126C40bf42b566e3513b1599f78070B3962f7114 |
| Testnet | None |

- XinFin

| Network | Contract Addresses |
| -------------- | :---------------------------------------------------------: |
| Mainnet | xdc656869af3Ec1E8b2982Fc370A0526541C0Ceb90B |
| Apothem | xdcDe5109BB09C1bC6dE7Ea7c856D4abf4Be99D824b |
| Testnet | None |

Improvements
- Change Ethereum provider `amount_unit_converter` function from `unit` to `unit_from` parameter.

0.4.0

New Cryptocurrencies
- Add [Ethereum](https://github.com/ethereum/go-ethereum) `ETH` blockchain network.

| Network | Contract Addresses |
| -------------- | :---------------------------------------------------------: |
| Mainnet | None |
| Ropsten | 0xE5cb615899436A490dBde26d7880A0C2502Fc676 |
| Kovan | None |
| Rinkeby | None |
| Testnet | None |

- Add [XinFin](https://github.com/XinFinOrg/XDPoSChain) `XDC` blockchain network.

| Network | Contract Addresses |
| -------------- | :---------------------------------------------------------: |
| Mainnet | xdc656869af3Ec1E8b2982Fc370A0526541C0Ceb90B |
| Testnet | None |

New
- Add `get_current_timestamp` function on `swap.utils` package.
- Add `estimate_endblock` function by timestamp on `swap.providers.bytom.utils` and `swap.providers.vapor.utils` packages.

Improvements
- Change all Transaction, Solver, and Signature `Claim` to `Withdraw` class names.
- Now, Bitcoin Time-Locked, changed from expiration block (sequence) to expiration timestamp.
- Drop Normal Transaction, Solver, and Signature from all providers.
- Removed `MAX`amount parameter from all transaction build functions.
- Change all providers `amount_unit_converter` function from `unit` to `unit_from` parameter.

Dependencies
- Add PyXDC v0.1.1 package to interact with XinFin network.
- Add Web3 v5.19.0 package to interact with Ethereum and XinFin networks.
- Add Py-Solc-X v1.1.0 package and Solc for Solidity language compiler.
- Bump HDWallet from v0.2.0 to v1.3.1 package

0.4.0a1

0.3.2a2

New
- Add address hash type parameter for all `is_address` functions to checking detail `p2pkh`, `p2skh`, `p2wpkh` or `p2wsh` address types.
- Add amount unit parameter for all `build_transaction` functions to convert amount and fee.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.