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

Enable interactions with Stellar Asset Contracts #15

Open
ElliotFriend opened this issue Sep 25, 2024 · 11 comments
Open

Enable interactions with Stellar Asset Contracts #15

ElliotFriend opened this issue Sep 25, 2024 · 11 comments
Assignees
Labels
ODHack8 Issues eligible for the OnlyDust hackathon

Comments

@ElliotFriend
Copy link
Contributor

It's possible that a user's contact list might include a contract's C... address (or many of them). When sending a payment of some asset to those contacts, we should utilize the SAC and create a transfer transaction with the invokeHostFunction operation, instead of a typical payment operation.

@ElliotFriend ElliotFriend added the ODHack8 Issues eligible for the OnlyDust hackathon label Sep 25, 2024
@CollinsC1O
Copy link

@ElliotFriend can i pick on this please

Copy link

onlydustapp bot commented Sep 26, 2024

Hi @CollinsC1O!
Maintainers during the ODHack # 8.0 will be tracking applications via OnlyDust.
Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

@Josh-121
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

sotware engineering background and smart contract dev with esperience in working in similar issues in last hackthons(https://app.onlydust.com/u/Josh-121). looking to make first contribution here!!

How I plan on tackling this issue

Identify Contract Addresses in User's Contact List:

Modify the logic to check the user’s contact list for any contract addresses that start with "C" (or other relevant identifiers).
Create a function that filters and identifies these contract addresses from the user’s contacts.
Utilize the SAC (Smart Asset Controller):

Integrate the Smart Asset Controller (SAC) into the payment workflow.
Ensure the SAC is capable of handling both traditional payments and transfer transactions for contracts.
Implement invokeHostFunction:

When a payment is initiated, check if any of the recipients are contract addresses.
If a recipient is a contract address:
Use the invokeHostFunction operation to create a transfer transaction.
Pass necessary parameters such as the contract address, asset type, amount, and any additional data required by the contract.
Transaction Creation Logic:

Develop a function to encapsulate the logic for creating transactions. This should differentiate between standard payment operations and transfer transactions using the SAC.
Handle any specific parameters or formats needed for invokeHostFunction.
Error Handling:

Implement robust error handling for transaction failures, especially when interacting with contracts. Ensure that the user is notified of any issues and can retry the transaction if necessary.

work on feedback/recommendations

@CollinsC1O
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello @ElliotFriend I'm a front-end and also a blockchain developer. I will love to work on this

@ScottyDavies
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a solid background in blockchain development and smart contract integration, with experience in implementing transaction operations in decentralized applications

How I plan on tackling this issue

To address this problem, I would:

Update the logic to check if any contact addresses in the user's list are contract addresses.

Implement the necessary functionality to utilize the Smart Asset Contract (SAC) for transfers.

Change the payment operation to create a transfer transaction using the invokeHostFunction operation for those contacts identified as contracts.

Thoroughly test the new functionality to ensure that transfers to contract addresses are executed correctly and securely.

Update any relevant documentation to reflect the changes in the payment process.

@ShantelPeters
Copy link
Contributor

ShantelPeters commented Sep 26, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

i am a blockchain developer / technical writer i will like to take up this issue, kindly assign

How I plan on tackling this issue

To approach this problem i will modify the payment functionality to check for C... addresses in the user's contact list. If a C... address is detected,and then utilize the SAC to create a transfer transaction that employs the invokeHostFunction operation instead of the standard payment operation, ensuring proper handling of contract interactions.

@josephchimebuka
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello @ElliotFriend I am Joseph I am a Software developer and blockchain developer and I am also an active contributor here on only dust here is my profile https://app.onlydust.com/u/josephchimebuka. This is my first time to contribute to this repo ill appreciate the opportunity to contribute.

How I plan on tackling this issue

To solve this, I will first detect when a user's contact list contains a contract's C... address. If such an address is selected for sending a payment, I will modify the payment process to use the Stellar Asset Contract (SAC). Instead of performing a standard payment operation, I will create a transfer transaction by utilizing the invokeHostFunction operation. This will enable the correct transfer of assets to the contract address. I will ensure that this logic is incorporated into the transaction creation flow and thoroughly test it to verify that payments to contract addresses work as expected.

@ShantelPeters
Copy link
Contributor

Hi @ElliotFriend kindly review my PR ser.

@ShantelPeters
Copy link
Contributor

Hi @ElliotFriend kindly review the requested changes sir ..

@ElliotFriend ElliotFriend linked a pull request Oct 7, 2024 that will close this issue
@ShantelPeters
Copy link
Contributor

Hi sir @ElliotFriend kindly review the requested changes. Thank you

@KoxyG
Copy link

KoxyG commented Oct 31, 2024

Hi @ElliotFriend can i work on this also?. If its available, pls assign this to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment