ido: port to ORB IdoParams generation, no backward compatibility
Preinit txs must now spend an ORB IdoParams NFT (use() at input #1, preserved at output #10) whose per-network category is pinned and whose 121-byte commitment is cross-checked field-by-field against the announced parameters; xToken must be a non-native token. ido.db is version-gated (PRAGMA user_version = 2); legacy IDOs do not parse. Also refresh the embedded IDOPostLaunch contract to the current tokentoken-delegation build (1616 bytes, libriften ido+ttd a9fcfa0); the previous copy predated the recompile and would have failed the preinit output #7 byte-compare. All other embedded contracts verified byte-identical to the libriften templates. Per-network IdoParams NFT categories are still all-zero placeholders; until set, every preinit indexes as is_valid=false. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
1ddab462aa
commit
a5f4ce40d4
2 changed files with 605 additions and 229 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -142,6 +142,9 @@ pub async fn initialize_databases(network: &str, read_slots: ReadSlots) -> Resul
|
||||||
create_db_pool(&db_path(db_dir, "ido.db"), read_slots.ido).await;
|
create_db_pool(&db_path(db_dir, "ido.db"), read_slots.ido).await;
|
||||||
if !db_exists {
|
if !db_exists {
|
||||||
ido_prepare_tables(&ido_db_write).await;
|
ido_prepare_tables(&ido_db_write).await;
|
||||||
|
crate::db::ido::set_db_version(&ido_db_write).await?;
|
||||||
|
} else {
|
||||||
|
crate::db::ido::check_db_version(&ido_db_read).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(DB {
|
Ok(DB {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue