1

I'm trying to pass a map into action, but there is serialization error:

Error: expected object containing data: undefined

There is a function signature:

void init(uint64_t id, const map<uint8_t, asset>& balances);

There is tx data I pass:

data: {
    id: id,
    balances: {0: "1.0000 EOS", 1: "1.0000 TOKEN"}
}

I also tried this tx data:

data: {
    id: id,
    balances: [{0: "1.0000 EOS"}, {1: "1.0000 TOKEN"}]
}

1 Answer 1

0

balances field should look like [{'key': 1, 'value': '1.0000 EOS'}]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.