Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Enable extended_asset to be encoded from array #7487

Merged
merged 1 commit into from
Aug 8, 2019

Conversation

conr2d
Copy link
Contributor

@conr2d conr2d commented Jun 11, 2019

Change Description

eosio::extended_asset uses generated fc::from_variant() to encode, so it should be passed by object.

$ cleos push action xxx xxx '[{"quantity": "1.0000 EOS", "contract": "eosio.token"}]' -p eosio

However, non-built_in type like eosio::extended_symbol uses _variant_to_binary of abi_serializer and encoding from array is supported.

$ cleos push action xxx xxx '[["4,EOS", "eosio.token"]]' -p eosio

This PR adds overloaded fc::from_variant for extended_asset to support encoding from both object and array.

$ cleos push action xxx xxx '[["1.0000 EOS", "eosio.token"]]' -p eosio
$ cleos push action xxx xxx '[{"quantity": "1.0000 EOS", "contract": "eosio.token"}]' -p eosio

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@b1bart b1bart merged commit e8ab01b into EOSIO:develop Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants