algorand / algorand/go-algorand-sdk
Using AtomicTransactionComposer.AddMethodCall w/ UseAccess set and []ForeignAssets w/ 0 isn't rejected
- Lenguaje dominante
- Go
- Estrellas
- 189
- Forks
- 107
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 3
Descripción
### Your environment
* go-algorand-sdk: 2.11.1
### Steps to reproduce
1. Construct a transaction.AddMethodCallParams{ ..} instance w/ AppID, method args, etc.
2. Set UseAccess: true
3. Add 0 as member of ForeignAssets slice.
4. Call AddMethodCall(params) on AtomicTransactionComposer instance.
### Expected behaviour
A foreign asset reference to 0 isn't valid and should return an error from AddMethodCall
### Actual behaviour
The access list composition code adds an empty reference for the asset 0 reference, creating what is technically 'valid', but different, an empty ResourceRef is really treated at runtime by the AVM as an empty box reference. Callers should have to pass an empty box reference to do this, not a 0 asset reference.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.