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"}]
}
0

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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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