Conversation
|
| bytes memory data, | ||
| FieldLayout fieldLayout | ||
| ) internal { | ||
| if (!Tables.getOffchainOnly(tableId)) { |
There was a problem hiding this comment.
this might be another good use case for a "resource type" encoded in the resource selector, i.e. table ID
There was a problem hiding this comment.
it's pretty important to avoid divergence of offchain and onchain state. Yeah a resource type would be a nice alternative
|
Design question: since we're using regular events and soon we'll encode the notion of "offchain table" into the resource selector/table ID (which we'll ~always have access to in these methods), would it make sense to not have separate methods for emitting and just use e.g. If so, should we do #1498 first to avoid API churn? (two PRs instead of potentially three) |
I think it'd make sense, but it'd also add a little gas overhead to onchain tables, since we'll always need to extract resource type and check it. The overhead is possibly worth having 2 fewer methods |
|
from discord:
|
|
closing in favor of #1558 |
|
For context: decided to start over because we changed the approach away from a separate method for ephemeral tables and towards conditionally early returning in the main StoreCore methods based on the table's resource type, so it seemed like a smaller lift to start fresh than to fix the merge conflicts of this PR with the recent changes |
fixes #1496