I intend to call an endpoint of a contract and I found the correct Data Input params message, (used this converted to HEX): ESDTNFTTransfer@WXMEX-794dbd@8@1000000000000000000000@erd1qqqqqqqqqqqqqpgqpvlxt3n9ks66kuq4j8cvcv25k8a5rsx99g6suw5r66@supply
As a result I get an error coming from SC itself: https://explorer.multiversx.com/transactions/ee18fb3d5252a0ec58642d96f87749a218aedc499b04b4e35329ef9f2c7c72eb “Fungible ESDT token expected” - that means that whitelisted SC doesn’t accept non fungible tokens. Right?
I was digging in the code and found this:
#[payable(“*”)]
#[only_owner]
#[endpoint(supply)]
fn supply(&self) {
let rewards_token = self.rewards_token().get();
let (supply_token, supply_amount) = self.call_value().egld_or_single_fungible_esdt();
require!(supply_token == rewards_token, “Invalid rewards token supply”);
self.rewards_supply().update(|rewards_supplied| *rewards_supplied += &supply_amount);
You're right, the contract endpoint looks like it only accepts egld or a single fungible token via the endpoint payment:
In order to accept semi-fungibles, non-fungibles and meta-esdts as well, it should've been something like: