Playground IDE: Transaction build error. {"ownerId":"Field is required"}

Hi,

i get the error message

Transaction build error. {"ownerId":"Field is required"}

When trying to deploy a contract via https://testing.playground.aepps.com

Please help :slight_smile: this is my contract

contract Identity =
  record state = {
    name : string,
    age : int
    }

  function init() = {
    name = "Andrew",
    age = 30
    }
    
  public function getState() : string =
    state.name
    
  public stateful function setState(n : string, a : int) =
    put(state{name = n, age=a})
1 Like

Hey @emin,

This issue is related to the generalized accounts. The account which is provided in the default playground configuration was generalized by the community, and these accounts are not supported yet. By the end of this week support for them will be provided, and we will update the account in the playground.

As a workaround, for now, you can just use another account which is not generalized and everything will work as expected.

Best,
Martin

2 Likes

How can i check if an account is generalized or not. Does the node API return anything here to identify this?

To check the properties of an account you can simply send a GET request to this URL:
node_url/v2/accounts/account_address

For example for the testnet and the playground default address is this:
https://sdk-testnet.aepps.com/v2/accounts/ak_6A2vcm1Sz6aqJezkLCssUXcyZTX7X8D5UwbuS2fRJr9KkYpRU.

The return data from the call in Postman is this:
{ "auth_fun": "add_to_number", "balance": 811193097223266796526, "contract_id": "ct_21tCooXGgLatMYEkXAgHczh3WwH1upzmNWCM9JHYQYu8mqt2ck", "id": "ak_6A2vcm1Sz6aqJezkLCssUXcyZTX7X8D5UwbuS2fRJr9KkYpRU", "kind": "generalized", "nonce": 13013 }

The field kind describes the type of the account.

Best,
Martin

1 Like