Files
nym/tools/internal/testnet-manager/migrations/02_performance_contract.sql
T
Jędrzej Stuczyński 6de0c4ce92 feat: initial performance contract (#5833)
* initialised basic structure for the performance contract

* shared code for contract testing

* unified common testing methods between performance and nym pool contracts

* impl of ExecuteMsg for the contract

* impl of QueryMsg for the contract

* setting initial authorised NMs during instantiation

* additional tests and fixes

* ibid

* scaffolding for client traits

* completed client traits

* clippy

* naive add performance contract to testnet manager

* placeholder values for the performance contract address

* introduced admin messages to purge old measurements from the storage

* introduced check ensuring performance data is only added to bonded nodes
2025-06-20 09:06:56 +01:00

54 lines
2.6 KiB
SQL

/*
* Copyright 2025 - Nym Technologies SA <contact@nymtech.net>
* SPDX-License-Identifier: GPL-3.0-only
*/
CREATE TABLE network_old
(
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL,
mixnet_contract_id INTEGER NOT NULL REFERENCES contract (id),
vesting_contract_id INTEGER NOT NULL REFERENCES contract (id),
ecash_contract_id INTEGER NOT NULL REFERENCES contract (id),
cw3_multisig_contract_id INTEGER NOT NULL REFERENCES contract (id),
cw4_group_contract_id INTEGER NOT NULL REFERENCES contract (id),
dkg_contract_id INTEGER NOT NULL REFERENCES contract (id),
rewarder_address TEXT NOT NULL REFERENCES account (address),
ecash_holding_account_address TEXT NOT NULL REFERENCES account (address)
);
INSERT INTO network_old
SELECT *
from network;
DROP TABLE network;
CREATE TABLE network
(
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL,
mixnet_contract_id INTEGER NOT NULL REFERENCES contract (id),
vesting_contract_id INTEGER NOT NULL REFERENCES contract (id),
ecash_contract_id INTEGER NOT NULL REFERENCES contract (id),
cw3_multisig_contract_id INTEGER NOT NULL REFERENCES contract (id),
cw4_group_contract_id INTEGER NOT NULL REFERENCES contract (id),
dkg_contract_id INTEGER NOT NULL REFERENCES contract (id),
performance_contract_id INTEGER NOT NULL REFERENCES contract (id),
rewarder_address TEXT NOT NULL REFERENCES account (address),
ecash_holding_account_address TEXT NOT NULL REFERENCES account (address)
);
CREATE TABLE authorised_network_monitor
(
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
network_id INTEGER NOT NULL REFERENCES network (id),
address TEXT NOT NULL REFERENCES account (address)
);