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

Args Address type #546

Open
hicaru opened this issue Mar 30, 2024 · 2 comments
Open

Args Address type #546

hicaru opened this issue Mar 30, 2024 · 2 comments

Comments

@hicaru
Copy link

hicaru commented Mar 30, 2024

  • this type https://github.com/massalabs/massa-web3/blob/main/packages/web3-utils/src/arguments.ts#L11 need address type
@Ben-Rey
Copy link
Collaborator

Ben-Rey commented Apr 2, 2024

Hello! From the FT contract, it's a string https://github.com/massalabs/massa-standards/blob/604d35739aa3663c53434cb69ac62c7b6131ef1d/smart-contracts/assembly/contracts/FT/token.ts#L147

If you need a check you still can do

const args = new Args();
args.addString(new Address("AU...").base58Encoded)

It will check if the address is valid.

If you just need to to send the string

const args = new Args();
args.addString("AU...");

@hicaru
Copy link
Author

hicaru commented Apr 2, 2024

Hello! From the FT contract, it's a string https://github.com/massalabs/massa-standards/blob/604d35739aa3663c53434cb69ac62c7b6131ef1d/smart-contracts/assembly/contracts/FT/token.ts#L147

If you need a check you still can do

const args = new Args();
args.addString(new Address("AU...").base58Encoded)

It will check if the address is valid.

If you just need to to send the string

const args = new Args();
args.addString("AU...");

Thanks for answer, i mean it will be cool make it more abstract like Address type)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants