Closed nsjames closed 6 years ago
What does the ABI look like?
{
"name": "ClaimReservation",
"base": "",
"fields": [{
"name": "username",
"type": "string"
},{
"name": "sig",
"type": "signature"
},{
"name": "key",
"type": "id_key"
}
]
},{
"name": "claim",
"base": "",
"fields": [{
"name": "claim",
"type": "ClaimReservation"
}
]
}
It's not that one specifically but that one does the exact same.
I'm wondering if you need something like this:
contract.projectup({Project: {teamid:'1234'}})
If you have the actual ABI that matches projectup that would be helpful.
I believe this is accurate.. Please review:
struct Project {
string name;
EOSLIB_SERIALIZE( Project, (name) )
};
class hello : public eosio::contract {
public:
using contract::contract;
void project ( Project project ) {
print("project called: ", project.name);
}
};
EOSIO_ABI( hello, (project) )
eos.contract('hello.code').then(hello => {
const arg = {"project": {"name": "project name"}}
const auth = {authorization: 'hello.code'}
return hello.project(arg, auth)
})
# nodeosd --contracts-console
[(hello.code,project)->hello.code]: CONSOLE OUTPUT BEGIN =====================
project called: project name
[(hello.code,project)->hello.code]: CONSOLE OUTPUT END =====================
Version: eosjs ^10.0.0
The following throws the error: TypeError: Cannot read property 'teamid' of undefined Project.teamid projectup.project action.data transaction.actions
The following works