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

3 Find a better way to recognize Stellar Classic Assets from Soroban Contracts #519

Closed
esteblock opened this issue Aug 20, 2024 · 1 comment · Fixed by #541
Closed

3 Find a better way to recognize Stellar Classic Assets from Soroban Contracts #519

esteblock opened this issue Aug 20, 2024 · 1 comment · Fixed by #541
Assignees

Comments

@esteblock
Copy link
Member

I took the CODE:ISSUER from the name of the token here:

f2c6987

This is in order to let the user create a trustline with a stellar classic asset that its not in the list.
However this might have a risk of a user

  1. creating a token with a name with abother CODE:ISSUER
  2. social engineer a second user to use that soroban address
  3. let him think that it is the CODE:ISSUER

We need a way to know 100% if a contract is a wrapped stellar classic asset

@chopan123
Copy link
Collaborator

I think it could be a check like:

function checkContractId(contractId: string, code: string, issuer: string): boolean {
	const asset = new Asset(code, issuer);
    return asset.getContractId() === contractId;
}

@MattPoblete MattPoblete linked a pull request Sep 6, 2024 that will close this issue
@MattPoblete MattPoblete removed a link to a pull request Sep 9, 2024
@chopan123 chopan123 changed the title Find a better way to recognize Stellar Classic Assets from Soroban Contracts 3 Find a better way to recognize Stellar Classic Assets from Soroban Contracts Sep 9, 2024
@MattPoblete MattPoblete linked a pull request Sep 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants