You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2a01556
Browse filesBrowse the repository at this point in the historyBrowse files
| `{ type: pda, program_id, seeds }` | a derived account; seeds resolve against the override's values |
118
+
119
+
`$slot`, `$slot±N` and `$unix_s`/`ms`/`us`/`ns` in `values` are filled from the slot and its Clock
120
+
time; other values are written as given.
121
+
122
+
Keep-alive starts in the slot the importing override plays and rewrites its fields every slot, after
123
+
that slot's overrides, until the network is reset. An override of one of those fields therefore
124
+
never takes effect. An account not yet in the surfnet is fetched from the remote first, unless it,
125
+
or its owner with its owned accounts, is marked offline. Keep-alive is kept in memory only: after a restart on a persistent database it stops
126
+
until an importing override plays again.
127
+
85
128
### Override Templates
86
129
Directly using the `surfnet_registerScenario` endpoint requires building out a map of account keys that are specific to the schema of the account that is being written to.
87
130
This is a cumbersome process in most cases.
@@ -104,6 +147,7 @@ The following steps can be followed to natively support a protocol:
104
147
1. This file is what will populate Surfpool Studio's UI with the protocol details. The Pyth override file linked above produces the following in the UI:
4. Update the [registry.rs](./registry.rs) file. A small amount of code has to be written to wire together the template registry, the `overrides.yaml`, and the `idl.json`. See the `load_pyth_overrides` and `load_jupiter_overrides` functions for examples.
150
+
5. If the protocol's own off-chain actor rewrites accounts every slot, add a keep-alive file with the templates it writes, load it with `load_keep_alive`, and import them from the override templates. See [Keep-alive](#keep-alive).
107
151
108
152
If any part of these instructions are beyond your skill level or availability, but you'd like to see a specific protocol supported, feel free to [Open an Issue to Support a new Protocol](https://github.com/solana-foundation/surfpool/issues/new?template=native-scenario-support-for-protocol.md)!
109
153
Opening an issue to signal interest is a big help.
0 commit comments