Making Sophia Smart Contract as Owner of NFT or Fungible Token

hello everyone,

Does anyone know how can we make a smart contract owner of an NFT(AEX-141) or fungible token?
I see that we can make an address an owner or even transfer ownership to other addresses(starting with ‘ak_’)

But what I’m looking forward to is to make a smart contract(address starting with ''ct_") the owner of an NFT or a digital asset in aeternity.

Thanks for any help in advance.

2 Likes

Let’s see if I can explain this - firstly, there is no such thing as an “addess starting with ct_”. ct_... is a contract (or perhaps one can also call it a contract address).

Aeternity is an account based blockchain - and the accounts is the foundation for everything. It is only accounts that can hold aeternity tokens, etc. Accounts are refered to by ak_xyz... Then, we can attach more attributes to an account, for example an account can be registered as an oracle - and then the oracle of account ak_xyz... can be refered to by the oracle address ok_xyz.... Note that the xyz... part is the same, the ok_ is just clarifying the type.

The same holds for contracts. When a contract is created (ContractCreateTx) an account ak_abc... is created and a contract ct_abc... is attached to it. If the contract holds tokens they are in the account, etc. So, when it comes to ownership it is (normally) addresses that own things.

In contract code you can use Contract.address to refer to the current contract, and if you have a variable of a contract type (say myContract: MyContract) you can use myContract.address to get its address.

I hope this clarifies the relationship between addresses and their features (names, oracles and contracts).

2 Likes