Ok I did some more investigation and found that the only way to save contracts is to use the quit button on the Application drop down menu and it saved the name of my new contract and account. The X button on the top right of EOSStudio doesn’t save accounts or contracts.
My new question is do you have a list of errors for both the build and deploy functions and suggestions as to what the problem might be? I looked on google and didn’t see any error listings.
For example, when I deploy the helloworld project I get the error
"deploy failed’
“serialization time limit 15000us exceeded”
My other question is which parts of the pet contract we’re building require the project name and which require the contract name. I want to get a correctly working project and contract so I can study it.
#ifndef HELLOWORLD
#define HELLOWORLD
#include <eosio/eosio.hpp>
#include <pet.hpp>
CONTRACT helloworld : public eosio::contract
{
public :
using eosio::contract::contract;
ACTION hi(eosio:: name const & nm);
ACTION addpet( uint64_t const id, eosio:: name const & owner, eosio:: name const & pet_name, uint64_t const age, eosio:: name const & type);
};
#ifndef PET
#define PET
class [[eosio::table, eosio::contract(“helloworld”)]] pet_t
{
private :
uint64_t id;
eosio:: name owner;
eosio:: name pet_name;
uint64_t age;
eosio:: name type;
public :
pet_t(){}
pet_t( uint64_t const _id,
eosio:: name const & _owner,
eosio:: name const & _pet_name,
uint64_t _age,
eosio:: name const _type) : id(_id), owner(_owner), pet_name(_pet_name), age(_age), type(_type) {}
uint64_t get_id() const { return id; }
eosio:: name get_owner() const { return owner; }
eosio:: name get_pet_name() const { return pet_name; }
uint64_t get_age() const { return age; }
eosio:: name get_type() const { return type; }
uint64_t primary_key() const { return get_id (); }
EOSLIB_SERIALIZE ( pet_t, (id)(owner)(pet_name)(age)(type) )
};
typedef eosio::multi_index< “pets”_n, pet_t > pets_table;
#endif
#endif
#include <helloworld.hpp>
void helloworld::hi(eosio:: name const & nm)
{
eosio:: print ("Hello ", nm);
}
void helloworld::addpet( uint64_t const id, eosio:: name const & owner, eosio:: name const & pet_name, uint64_t const age, eosio:: name const & type)
{
pets_table pets( get_self (), get_self ().value);
pets. emplace ( get_self (), [&]( auto & entry){
entry = pet_t(id, owner, pet_name, age, type);
});
}
Tks
Don