### Initialize Network - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Initializes the network with provided parameters. This function is typically called once during deployment or setup. ```solidity function initialize(NetworkInitParams memory networkInitParams) external; ``` -------------------------------- ### Install Project Dependencies with npm Source: https://github.com/symbioticfi/network/blob/main/README.md Installs the necessary JavaScript dependencies for the Symbiotic Network project using npm. Ensure Node.js and npm are installed before running this command. ```bash npm install ``` -------------------------------- ### Run Development Server (Bash) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/README.md Command to start the development server for the Network Dashboard. This command is used to initiate the local development environment for interacting with the network contract states. ```bash npm run dev ``` -------------------------------- ### Console Output: Network Deployment Logs Source: https://github.com/symbioticfi/network/blob/main/README.md Example console output logs after successfully deploying a Symbiotic Network. This includes the deployed network address, proxy admin contract, new implementation address, and the salt used for deployment. ```text Deployed network network:0x90F545649eDA7a2083bA30ECC5C21335d030ae1d proxyAdminContract:0x79d771aeC770C936E05E51fA8e68f019a373f9b1 newImplementation:0x3C00C0ef1B1be4dFFeF07dB148bb5fbF31277091 salt:0x5465737433000000000000000000000000000000000000000000000000000000 ``` -------------------------------- ### Console Output: Network Opt-in to Vault Logs Source: https://github.com/symbioticfi/network/blob/main/README.md Example console output logs indicating that a Symbiotic Network has been successfully opted into a specific Vault. This log details the network address, vault address, subnetwork ID, maximum network limit, and the resolver address associated with the opt-in. ```text Opted network into vault network:0x90F545649eDA7a2083bA30ECC5C21335d030ae1d vault:0x49fC19bAE549e0b5F99B5b42d7222Caf09E8d2a1 subnetworkId:0 maxNetworkLimit:1000 resolver:0xbf616b04c463b818e3336FF3767e61AB44103243 ``` -------------------------------- ### Get Network Metadata URI - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Retrieves the metadata URI associated with the network. This can be used to access extended information about the network. ```solidity function metadataURI() external view returns (string memory); ``` -------------------------------- ### Deployment Log Output Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/README.md Example log output from the Foundry deployment scripts, showing the deployed network address, proxy admin contract, new implementation address, and the salt used. Also includes confirmation of a network being opted into a vault with associated parameters. ```bash Deployed network network:0x90F545649eDA7a2083bA30ECC5C21335d030ae1d proxyAdminContract:0x79d771aeC770C936E05E51fA8e68f019a373f9b1 newImplementation:0x3C00C0ef1B1be4dFFeF07dB148bb5fbF31277091 salt:0x5465737433000000000000000000000000000000000000000000000000000000 Opted network into vault network:0x90F545649eDA7a2083bA30ECC5C21335d030ae1d vault:0x49fC19bAE549e0b5F99B5b42d7222Caf09E8d2a1 subnetworkId:0 maxNetworkLimit:1000 resolver:0xbf616b04c463b818e3336FF3767e61AB44103243 ``` -------------------------------- ### Execute SetMaxNetworkLimit Script with Forge CLI (Bash) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/README.md These bash commands demonstrate how to execute the SetMaxNetworkLimit script using the Forge CLI. The first example shows execution for an EOA wallet, while the second is for a Safe multisig wallet, generating transaction calldata. ```bash # For EOA wallet execution forge script script/actions/SetMaxNetworkLimit.s.sol:SetMaxNetworkLimit --sig "runS()" --rpc-url --private-key --broadcast # For Safe multisig wallet (to get calldata) forge script script/actions/SetMaxNetworkLimit.s.sol:SetMaxNetworkLimit --sig "runS()" --rpc-url --sender --unlocked ``` -------------------------------- ### Clone Symbiotic Network Repository Source: https://github.com/symbioticfi/network/blob/main/README.md Clones the Symbiotic Network repository, including all submodules. This is a prerequisite for setting up the project and requires Git to be installed. ```bash git clone --recurse-submodules https://github.com/symbioticfi/network.git ``` -------------------------------- ### Get Network Middleware Service Address - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Returns the address of the network's middleware service. This is crucial for understanding the service layer interactions within the network. ```solidity function NETWORK_MIDDLEWARE_SERVICE() external view returns (address); ``` -------------------------------- ### Get Network Name - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Retrieves the current name of the network. This function provides a way to identify the network by its name. ```solidity function name() external view returns (string memory); ``` -------------------------------- ### Get Minimum Delay for Target and Calldata - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Calculates and returns the minimum delay required for a specific target address and calldata. This function helps in understanding execution constraints. ```solidity function getMinDelay(address target, bytes memory data) external view returns (uint256); ``` -------------------------------- ### Get Network Registry Address - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Returns the address of the network's registry contract. This function is essential for interacting with network-related data and configurations. ```solidity function NETWORK_REGISTRY() external view returns (address); ``` -------------------------------- ### Internal Get Min Delay by Target/Selector Function (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Internal view function to retrieve the minimum delay for a specific target and selector. This is a protected helper function. ```solidity function _getMinDelay(address target, bytes4 selector) internal view virtual returns (uint256); ``` -------------------------------- ### Get Role for Metadata URI Update - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Retrieves the specific role required to update the network's metadata URI. This function is part of the INetwork interface. ```solidity function METADATA_URI_UPDATE_ROLE() external view returns (bytes32); ``` -------------------------------- ### Schedule and Execute Operation with Foundry (Bash) Source: https://context7.com/symbioticfi/network/llms.txt Schedules an operation through the Symbiotic Network's timelock using Foundry scripts. After the configured delay period, the operation can be executed. This example demonstrates scheduling a `setMaxNetworkLimit` operation. ```bash # Configure SetMaxNetworkLimit.s.sol: # NETWORK = 0x90F545649eDA7a2083bA30ECC5C21335d030ae1d # VAULT = 0x49fC19bAE549e0b5F99B5b42d7222Caf09E8d2a1 # MAX_NETWORK_LIMIT = 1000000000000000000000 # DELAY = 0 # SUBNETWORK_IDENTIFIER = 0 # Schedule the operation (if delay > 0) forge script script/actions/SetMaxNetworkLimit.s.sol:SetMaxNetworkLimit \ --sig "runS()" \ --rpc-url https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY \ --private-key YOUR_PRIVATE_KEY \ --broadcast # Wait for the delay period to pass... ``` -------------------------------- ### Get Network Name and Metadata URI (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Returns the configured name and metadata URI of the network. These are view functions, meaning they do not modify the contract's state. ```solidity function name() public view virtual returns (string memory); function metadataURI() public view virtual returns (string memory); ``` -------------------------------- ### Get Transaction Calldata for Safe Multisig Source: https://github.com/symbioticfi/network/blob/main/README.md This bash command shows how to obtain transaction calldata for executing the SetMaxNetworkLimit script with a Safe multisig wallet. It uses the Forge CLI with specific flags for RPC URL, sender address (multisig), and '--unlocked' to bypass signature checks. The output includes the 'callData' needed for Safe's TransactionBuilder. ```bash forge script script/actions/SetMaxNetworkLimit.s.sol:SetMaxNetworkLimit --sig "runS()" --rpc-url --sender --unlocked ``` -------------------------------- ### SetMaxNetworkLimit Transaction Calldata Example (Hex) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/README.md This is an example of the 'callData' field generated when executing the SetMaxNetworkLimit script with a Safe multisig. This hex-encoded data is used in the Safe Transaction Builder for custom data transactions. ```hex 0x01d5062a00000000000000000000000025ed2ee6e295880326bdeca245ee4d8b72c8f103000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000005365744d61784e6574776f726b4c696d697400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004423f752d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b6700000000000000000000000000000000000000000000000000000000 ``` -------------------------------- ### Solidity Import Grouping and Ordering Source: https://github.com/symbioticfi/network/blob/main/CONTRIBUTING.md Imports should be organized into logical groups (contracts, libraries, interfaces, external) and sorted alphabetically within each group. This promotes a clean and organized import structure. ```solidity import {NetworkManager} from "../base/NetworkManager.sol"; import {OzEIP712} from "../base/OzEIP712.sol"; import {PermissionManager} from "../base/PermissionManager.sol"; import {Checkpoints} from "../../libraries/structs/Checkpoints.sol"; import {KeyTags} from "../../libraries/utils/KeyTags.sol"; import {ISettlement} from "../interfaces/modules/settlement/ISettlement.sol"; import {ISigVerifier} from "../interfaces/modules/settlement/sig-verifiers/ISigVerifier.sol"; import {StaticDelegateCallable} from "@symbioticfi/core/src/contracts/common/StaticDelegateCallable.sol"; import {Subnetwork} from "@symbioticfi/core/src/contracts/libraries/Subnetwork.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; ``` -------------------------------- ### Network Contract Initialization (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Provides methods for initializing the Network contract. The `initialize` function is a virtual public function that takes `NetworkInitParams` to set up the network, while `__Network_init` is an internal function used during the initialization process. ```solidity function initialize(NetworkInitParams memory initParams) public virtual initializer; function __Network_init(NetworkInitParams memory initParams) internal virtual onlyInitializing; ``` -------------------------------- ### Get Role for Name Update - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Retrieves the specific role required to update the network's name. This function is part of the INetwork interface. ```solidity function NAME_UPDATE_ROLE() external view returns (bytes32); ``` -------------------------------- ### Internal Get ID Function (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Internal pure function to derive an ID from a target address and selector. This is a protected helper function. ```solidity function _getId(address target, bytes4 selector) internal pure virtual returns (bytes32 id); ``` -------------------------------- ### Solidity Versioning for Abstract Contracts, Libraries, and Interfaces Source: https://github.com/symbioticfi/network/blob/main/CONTRIBUTING.md Abstract contracts, libraries, and interfaces should use the caret (`^`) range operator for versioning (e.g., `pragma solidity ^0.X.0`). This approach allows for greater compatibility with newer Solidity versions while maintaining stability. ```solidity pragma solidity ^0.X.0; ``` -------------------------------- ### Forge Build, Test, and Format Commands (Bash) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/README.md Standard commands for interacting with the project using the Forge build tool. 'forge build' compiles the Solidity contracts, 'forge test' runs the test suite, and 'forge fmt' formats the code according to project standards. ```bash forge build forge test forge fmt ``` -------------------------------- ### Execute Network Limit Script via Forge CLI Source: https://github.com/symbioticfi/network/blob/main/README.md This bash command demonstrates how to execute the SetMaxNetworkLimit script using the Forge CLI. It specifies the script to run, the function to call ('runS()' for scheduling), and provides RPC URL and private key for authentication. The '--broadcast' flag indicates that the transaction should be broadcast to the network. ```bash forge script script/actions/SetMaxNetworkLimit.s.sol:SetMaxNetworkLimit --sig "runS()" --rpc-url --private-key --broadcast ``` -------------------------------- ### Solidity Versioning for Deployable Contracts Source: https://github.com/symbioticfi/network/blob/main/CONTRIBUTING.md Contracts intended for deployment must specify an exact Solidity version using the `pragma solidity 0.8.X;` statement. This ensures consistent compilation and predictable behavior across different environments. ```solidity pragma solidity 0.8.X; ``` -------------------------------- ### Internal Get Payload Function (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Internal pure function to extract the payload (remaining bytes after the selector) from raw transaction data. This is a protected helper function. ```solidity function _getPayload(bytes memory data) internal pure returns (bytes memory payload); ``` -------------------------------- ### Initialize Symbiotic Network Contract (Solidity) Source: https://context7.com/symbioticfi/network/llms.txt Initializes a new Symbiotic Network contract with custom parameters including global minimum delay, specific operation delays, roles, and metadata. It configures delays for target contracts and selectors, sets proposers and executors, and then initializes the network using the provided parameters. ```solidity // Initialize Network contract INetwork.NetworkInitParams memory params = INetwork.NetworkInitParams({ globalMinDelay: 3 days, delayParams: new INetwork.DelayParams[](2), proposers: new address[](1), executors: new address[](1), name: "My Symbiotic Network", metadataURI: "ipfs://QmExample...", defaultAdminRoleHolder: 0x1234567890123456789012345678901234567890, nameUpdateRoleHolder: 0x1234567890123456789012345678901234567890, metadataURIUpdateRoleHolder: 0x1234567890123456789012345678901234567890 }); // Configure specific delays for critical operations params.delayParams[0] = INetwork.DelayParams({ target: proxyAddress, selector: bytes4(keccak256("upgradeProxy(address)")), delay: 14 days }); params.delayParams[1] = INetwork.DelayParams({ target: vaultAddress, selector: bytes4(keccak256("setMaxNetworkLimit(address,uint96,uint256)")), delay: 0 }); // Set proposers and executors params.proposers[0] = adminAddress; params.executors[0] = adminAddress; // Initialize the network network.initialize(params); ``` -------------------------------- ### NetworkInitParams Struct Definition Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Defines the 'NetworkInitParams' struct used for initializing the Network contract. It encapsulates all necessary parameters for setting up a new network instance, including global delay, specific delay configurations, role holders, and metadata. ```solidity struct NetworkInitParams { uint256 globalMinDelay; DelayParams[] delayParams; address[] proposers; address[] executors; string name; string metadataURI; address defaultAdminRoleHolder; address nameUpdateRoleHolder; address metadataURIUpdateRoleHolder; } ``` -------------------------------- ### Internal Get Selector Function (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Internal pure function to extract the selector (first 4 bytes) from raw transaction data. This is a protected helper function. ```solidity function _getSelector(bytes memory data) internal pure returns (bytes4 selector); ``` -------------------------------- ### Execute Foundry Script for Network Deployment Source: https://github.com/symbioticfi/network/blob/main/README.md Command to execute the Foundry deployment script for a Symbiotic Network. Requires specifying RPC URL, private key, and Etherscan API key for deployment and verification. The --broadcast flag is used for broadcasting transactions. ```bash forge script script/DeployNetwork.s.sol --rpc-url --private-key --etherscan-api-key --broadcast --verify ``` -------------------------------- ### Initialize Network Contract (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Initializes the network contract with core parameters including minimum delay, proposer and executor addresses, and an admin address. This function is intended for contract deployment. ```solidity function initialize( uint256, /* minDelay */ address[] memory, /* proposers */ address[] memory, /* executors */ address /* admin */ ) public virtual override; ``` -------------------------------- ### Internal Get Min Delay by ID Function (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Internal view function to retrieve the minimum delay associated with a given ID. Returns a boolean indicating success and the delay value. ```solidity function _getMinDelay(bytes32 id) internal view virtual returns (bool, uint256); ``` -------------------------------- ### Execute Foundry Script for Network Deployment with Vaults Source: https://github.com/symbioticfi/network/blob/main/README.md Command to execute the Foundry deployment script for a Symbiotic Network integrated with Vaults. Similar to the pure deployment, it requires RPC URL, private key, and Etherscan API key, along with the --broadcast and --verify flags. ```bash forge script script/DeployNetworkForVaults.s.sol --rpc-url --private-key --etherscan-api-key --broadcast --verify ``` -------------------------------- ### Solidity Configuration for Pure Network Deployment Source: https://github.com/symbioticfi/network/blob/main/README.md Configuration settings for deploying a standalone Symbiotic Network contract using Foundry. This includes defining the network's name, default and specific action delays, and the admin address. The script can be executed with deployment and verification flags. ```solidity // Name of the Network string NAME = "My Network"; // Default minimum delay (will be applied for any action that doesn't have a specific delay yet) uint256 DEFAULT_MIN_DELAY = 3 days; // Cold actions delay (a delay that will be applied for major actions like upgradeProxy and setMiddleware) uint256 COLD_ACTIONS_DELAY = 14 days; // Hot actions delay (a delay that will be applied for minor actions like setMaxNetworkLimit and setResolver) uint256 HOT_ACTIONS_DELAY = 0; // Admin address (will become executor, proposer, and default admin by default) address ADMIN = 0x0000000000000000000000000000000000000000; // Optional // Metadata URI of the Network string METADATA_URI = ""; // Salt for deterministic deployment bytes11 SALT = "SymNetwork"; ``` -------------------------------- ### getMinDelay Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Calculates and returns the minimum delay required for a specific target address and calldata. ```APIDOC ## getMinDelay ### Description Returns the minimum delay for a given target and calldata. ### Method VIEW ### Endpoint N/A (Solidity function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### ``` -------------------------------- ### Get Minimum Delay for Target and Calldata (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Retrieves the minimum delay required for a specific function call on a target contract. This function takes the target address and the call's calldata as input and returns the calculated delay. ```solidity function getMinDelay(address target, bytes memory data) public view virtual returns (uint256); ``` -------------------------------- ### Network Contract Constructor (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/Network.sol/contract.Network.md Initializes the Network contract with the addresses of the network registry and network middleware service. These addresses are stored immutably and are essential for the contract's operation. ```solidity constructor(address networkRegistry, address networkMiddlewareService) ; ``` -------------------------------- ### Solidity Configuration for Network Deployment with Vaults Source: https://github.com/symbioticfi/network/blob/main/README.md Configuration for deploying a Symbiotic Network and integrating it with pre-deployed Vaults. Includes network settings, vault addresses, maximum delegation limits, and resolver addresses for each vault. Optional fields like subnetwork ID and metadata URI can also be set. ```solidity // Name of the Network string NAME = "My Network"; // Default minimum delay (will be applied for any action that doesn't have a specific delay yet) uint256 DEFAULT_MIN_DELAY = 3 days; // Cold actions delay (a delay that will be applied for major actions like upgradeProxy and setMiddleware) uint256 COLD_ACTIONS_DELAY = 14 days; // Hot actions delay (a delay that will be applied for minor actions like setMaxNetworkLimit and setResolver) uint256 HOT_ACTIONS_DELAY = 0; // Admin address (will become executor, proposer, and default admin by default) address ADMIN = 0x0000000000000000000000000000000000000000; // Vault address to opt-in to (multiple vaults can be set) address[] VAULTS = [0x0000000000000000000000000000000000000000]; // Maximum amount of delegation that network is ready to receive (multiple vaults can be set) uint256[] MAX_NETWORK_LIMITS = [0]; // Resolver address (optional, is applied only if VetoSlasher is used) (multiple vaults can be set) address[] RESOLVERS = [0x0000000000000000000000000000000000000000]; // Optional // Subnetwork Identifier (multiple subnetworks can be used, e.g., to have different resolvers for the same network) uint96 SUBNETWORK_ID = 0; // Metadata URI of the Network string METADATA_URI = ""; // Salt for deterministic deployment bytes11 SALT = "SymNetwork"; ``` -------------------------------- ### NameSet Event - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Emitted whenever the network's name is successfully set or updated, logging the new name. ```solidity event NameSet(string name); ``` -------------------------------- ### MetadataURISet Event - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Emitted when the network's metadata URI is updated, logging the new URI. ```solidity event MetadataURISet(string metadataURI); ``` -------------------------------- ### Solidity msg.sender/tx.origin Comparison Source: https://github.com/symbioticfi/network/blob/main/CONTRIBUTING.md When comparing `msg.sender` or `tx.origin` with other values, these keywords should always appear on the right side of the inequality. This ensures consistent and predictable comparison logic. ```solidity modifier onlyOwner() internal { if (owner != msg.sender) { revert NotOwner(); } } ``` -------------------------------- ### MinDelayChange Event - INetwork (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/src/interfaces/INetwork.sol/interface.INetwork.md Emitted when the minimum delay for a target and selector is changed. It logs the old and new status and delay values. ```solidity event MinDelayChange( address indexed target, bytes4 indexed selector, bool oldEnabledStatus, uint256 oldDelay, bool newEnabledStatus, uint256 newDelay ); ``` -------------------------------- ### Deploy Pure Network Contract (Solidity) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/README.md Configuration for deploying a standalone Symbiotic Network contract. This involves setting parameters like network name, default delays, cold/hot action delays, and the admin address. The script uses Foundry for deployment and verification. ```solidity // Name of the Network string NAME = "My Network"; // Default minimum delay (will be applied for any action that doesn't have a specific delay yet) uint256 DEFAULT_MIN_DELAY = 3 days; // Cold actions delay (a delay that will be applied for major actions like upgradeProxy and setMiddleware) uint256 COLD_ACTIONS_DELAY = 14 days; // Hot actions delay (a delay that will be applied for minor actions like setMaxNetworkLimit and setResolver) uint256 HOT_ACTIONS_DELAY = 0; // Admin address (will become executor, proposer, and default admin by default) address ADMIN = 0x0000000000000000000000000000000000000000; // Optional // Metadata URI of the Network string METADATA_URI = ""; // Salt for deterministic deployment bytes11 SALT = "SymNetwork"; ``` -------------------------------- ### Solidity Interface Naming Convention Source: https://github.com/symbioticfi/network/blob/main/CONTRIBUTING.md Interface names should be prefixed with a capital 'I' to clearly identify them as interfaces. This convention helps differentiate interface definitions from contract implementations. ```solidity interface IERC777 { ``` -------------------------------- ### Environment Configuration Template (.env) Source: https://github.com/symbioticfi/network/blob/main/docs/autogen/src/README.md Template for the environment variables file. Developers should create a `.env` file based on this template and fill in the necessary values for ETH RPC URL and Etherscan API Key to configure the build and deployment environment. ```dotenv ETH_RPC_URL= ETHERSCAN_API_KEY= ``` -------------------------------- ### Safe Transaction Builder Input Source: https://github.com/symbioticfi/network/blob/main/README.md This describes the parameters required when constructing a transaction in Safe's TransactionBuilder using the calldata obtained from a Forge script. It involves enabling 'Custom data', providing the Network's address as the target, and using the generated 'callData' as the data payload. ```markdown In Safe->TransactionBuilder, you should: - enable "Custom data" - enter **Network's address** as a target address - use the `callData` (e.g., `0x01d5062a0000000000000000000000...`) received earlier as a `Data (Hex encoded)` ```