Skip to content

Feature: Superfluid integrations #144

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Feature: Superfluid integrations #144

merged 1 commit into from
Aug 20, 2024

Conversation

1yam
Copy link
Member

@1yam 1yam commented Aug 9, 2024

This PR integrates superfluid.py with aleph-sdk-python by using the ETHAccount class. It eliminates the need to directly use private_key_str, making transactions more secure and easier to manage.:

create_flow_operation = cfaV1Instance.create_flow(
    sender, receiver, super_token, flow_rate)
transaction_hash = create_flow_operation.exec(PRIVATE_KEY

exemple of usage :

my_acc = ETHAccount(
    private_key,
    chain=Chain.AVAX,
    rpc=settings.AVAX_RPC,
    chain_id=settings.AVAX_CHAIN_ID,
)
transaction_hash = my_acc.create_flow(receiver, Decimal(0.03))

This PR also introduce:
-update_flow
-delete_flow
-get_flow

@github-actions github-actions bot added the RED This PR is complex and may require more time to review. label Aug 9, 2024
@Psycojoker Psycojoker changed the title Feauture: Superfluid integrations Feature: Superfluid integrations Aug 13, 2024
@1yam 1yam requested review from hoh and Psycojoker August 16, 2024 09:18
@1yam 1yam force-pushed the 1yam-superfuild-integrations branch from 33d7cdb to 26634ce Compare August 19, 2024 08:46
@1yam
Copy link
Member Author

1yam commented Aug 19, 2024

The PR should be good the test who don't pass should be fix on:
#150

@hoh
Copy link
Member

hoh commented Aug 20, 2024

CI fails due to FAILED tests/unit/test_price.py::test_get_program_price_invalid - AttributeError: can't set attribute 'http_session'

@1yam 1yam force-pushed the 1yam-superfuild-integrations branch 3 times, most recently from d920a12 to 608b0fc Compare August 20, 2024 09:30
Solution:
Install and import superfluid.py from PyPI.
Add helper methods on EthAccount
@1yam 1yam force-pushed the 1yam-superfuild-integrations branch from 608b0fc to 91668d4 Compare August 20, 2024 09:33
@aleph-im aleph-im deleted a comment from github-actions bot Aug 20, 2024
@hoh hoh merged commit fcb3730 into main Aug 20, 2024
14 checks passed
@hoh hoh deleted the 1yam-superfuild-integrations branch August 20, 2024 11:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
RED This PR is complex and may require more time to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants