Smart Contract Error: Unsupported instruction 0xc0

sub admin means alias

There is a function getAlias that will generate an alias https://github.com/Concordium/concordium-node-sdk-js/blob/18e3cd9f39645d9c0ffb9970079995fd89576f74/packages/common/src/alias.ts#L39C22-L39C22

Getting ‘OutOfEnergy’ error on testnet when adding more data for Vec<Vec> type.

#[derive(Serialize, SchemaType)]
pub struct TxData {
tx_email: Vec,
tx_details: Vec<Vec>,
}

We already add many data for one email id but adding more data now getting this error.
There is any limit to upload string in VEC?

My Wallet have already many testnet faucets.

Screenshot from 2023-10-26 15-38-19

The smart contract parameter is currently limited to 65535 bytes, passing information as JSON strings is not ideal, since it takes up a lot of bytes to encode.

How can we transfer CCD from smart contract to wallet? and If we want to send CCD on smart contract then we need to add any functionality like we add receive method in EVM based smart contracts?

You transfer CCD by using the HasHost in concordium_std - Rust method

If you want to transfer CCD to a smart contract you need to call one of its entrypoints that must accept the CCD.

If you want to transfer CCD to a smart contract you need to call one of its entrypoints that must accept the CCD.

Can you please share any example?

That means smart contract only receive wrapped CCD, We can not send directly CCD on smart contract?

No, a smart contract can receive, hold and send CCD, the above link is just to the wCCD smart contract example, which exposes an entrypoint wrap accepting CCD.
You can find more about receving CCD in a smart contract here

How Can we transfer ownership of deployed contract?
Currently I’m getting owner address by let owner = ctx.owner(); this.

We need to add any other functionality or method to transfer Ownership like we add ownable.sol in Solidity?

This is not possible. The “owner” field does not really have any special rights with respect to the contract.

It is a misnomer, it should have been called “creator”.

If you need special roles that can perform different actions you need to define them yourself.

Can we user this as a dead address or empty address like in solidity?

let empty_address = AccountAddress([0; 32]);

For
pub struct UserInfo {
user_address: AccountAddress,
user_details: String,
}

If i want to update user_details only and want to pass empty address in user_address then we can use empty_address for this or not?

please let me know if there is any other way to pass empty address?

While it is practically very unlikely that there will ever be an account with that specific address, there is no special meaning behind the all-zero address.

If you want to model the property that there might or might not be an address there then you should use an Option<AccountAddress> to achieve it.

If i need to pass nothing in Option then what i need pass?

Can i pass None?

And how can we convert Address to AccountAddress?

Yes, you pass in None to indicate “not present”.

You cannot convert an Address to an AccountAddress.

An Address is either an Account Address or a smart contract address. They are distinct.

let sender = _ctx.sender();
Here sender is Address type and we have one state
user_with_address: StateMap<AccountAddress, UserDataWithAddress, S>,

then how can we pass sender in user_with_address as a key of AccountAddress type?

host.invoke_transfer(&sender, balance).unwrap_abort(); also take AccountAddress type so its giving me error expected &AccountAddress, found &Address

So what do you want to do?

Do you want to allow contracts to call this entrypoint?

If not, you could just reject if you get a contract address as the sender.

pub struct Data {
user_address: Option < AccountAddress > ,
user_total_ccd: u64
}

If i’m trying to use
const data =
{
user_address: new AccountAddress(wallet.value.address),
user_total_ccd: 5
}

then its giving error “user_address” - > JSON Object with one field required for an Enum

I’m sorry, but can you show a bit more code.

What is wallet?