wharfkit / contract

Access table data, create actions, and retrieve types for Antelope-based Smart Contracts
https://wharfkit.com
Other
1 stars 1 forks source link

Performing a transaction #29

Closed aaroncox closed 8 months ago

aaroncox commented 11 months ago

This PR includes a test showing how we'd pass the data to a session.transact call.

Now that the contract no longer has a contract.call method, we lost the one place where we could pass in the ABI automatically for the developer trying to perform a transaction.

I'm trying to figure out the best way to add this functionality back in.

One idea I had: Could we have a ContractAction which extends Action, that is the same thing as an Action except with a Contract saved to it? If the contract.action('transfer') call returned one of these ContractAction instances and that's what was passed to the session kit, the session kit could just extract the ABI from the Contract automatically during transact.

dafuga commented 11 months ago

Yeah, I think that makes sense!

aaroncox commented 11 months ago

Related: https://github.com/wharfkit/antelope/pull/69