diff --git a/.env.example b/.env.example index a67b8b4..5c1c86b 100644 --- a/.env.example +++ b/.env.example @@ -1,13 +1,2 @@ -# Deployer key (REQUIRED) -PUBLIC_KEY= - -### Base URLs ### -# Mainnet -BASE_MAIN_RPC_URL= - -# Testnet -BASE_TEST_RPC_URL=https://sepolia.base.org - -# Blockscout API Key (RQUIRED FOR CONTRACT VERIFICATION) -# Foundry expects the API key to be defined as ETHERSCAN_API_KEY -ETHERSCAN_API_KEY= \ No newline at end of file +# API KEY (REQUIRED FOR CONTRACT VERIFICATION) +ETHERSCAN_API_KEY=CHANGE_ME diff --git a/.gas-snapshot b/.gas-snapshot index 6ef9dcc..e36df2c 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,47 +1,41 @@ -BuyerAgentTest:test_InBuyPhase() (gas: 182615337) -BuyerAgentTest:test_InSellPhase() (gas: 182593663) -BuyerAgentTest:test_RevertWhen_SetAmountPerRoundInBuyPhase() (gas: 182596518) -BuyerAgentTest:test_RevertWhen_SetFeeWithInvalidRoyalty() (gas: 182603480) -BuyerAgentTest:test_RevertWhen_SetRoyaltyInSellPhase() (gas: 182595095) -BuyerAgentTest:test_RevertWhen_WithdrawByAnotherOwner() (gas: 182621624) -BuyerAgentTest:test_RevertWhen_WithdrawInBuyPhase() (gas: 182608980) -BuyerAgentTest:test_SetRoyaltyAndAmountPerRound() (gas: 182604536) -BuyerAgentTest:test_WithdrawInWithdrawPhase() (gas: 182585003) -DeployTest:test_Deploy() (gas: 101371) -LLMOracleCoordinatorTest:test_Deployment() (gas: 86478543) -LLMOracleCoordinatorTest:test_RegisterOracles() (gas: 86763309) -LLMOracleCoordinatorTest:test_ValidatorIsGenerator() (gas: 87180676) -LLMOracleCoordinatorTest:test_WithValidation() (gas: 87839545) -LLMOracleCoordinatorTest:test_WithoutValidation() (gas: 87420651) -LLMOracleRegistryTest:test_Deployment() (gas: 18798876) -LLMOracleRegistryTest:test_RegisterGeneratorOracle() (gas: 19137915) -LLMOracleRegistryTest:test_RegisterValidatorOracle() (gas: 19137984) -LLMOracleRegistryTest:test_RevertWhen_RegisterSameGeneratorTwice() (gas: 19141313) -LLMOracleRegistryTest:test_RevertWhen_RegistryHasNotApprovedByOracle() (gas: 18938187) -LLMOracleRegistryTest:test_RevertWhen_UnregisterSameGeneratorTwice() (gas: 19157453) -LLMOracleRegistryTest:test_UnregisterOracle() (gas: 19154341) -LLMOracleRegistryTest:test_WithdrawStakesAfterUnregistering() (gas: 19179317) -SwanIntervalsTest:test_ChangeCycleTime() (gas: 184999199) -SwanIntervalsTest:test_InBuyPhase() (gas: 182573254) -SwanIntervalsTest:test_InSellPhase() (gas: 182568456) -SwanIntervalsTest:test_InWithdrawPhase() (gas: 182576467) -SwanTest:test_CreateBuyerAgents() (gas: 183760248) -SwanTest:test_Deployment() (gas: 179280562) -SwanTest:test_PurchaseAnAsset() (gas: 188748932) -SwanTest:test_RelistAsset() (gas: 187998184) -SwanTest:test_RevertWhen_CreateBuyerWithInvalidRoyalty() (gas: 179349648) -SwanTest:test_RevertWhen_ListInWithdrawPhase() (gas: 183823955) -SwanTest:test_RevertWhen_ListMoreThanMaxAssetCount() (gas: 187892487) -SwanTest:test_RevertWhen_PurchaseByAnotherBuyer() (gas: 187906998) -SwanTest:test_RevertWhen_PurchaseInSellPhase() (gas: 187890335) -SwanTest:test_RevertWhen_PurchaseMoreThanAmountPerRound() (gas: 188775426) -SwanTest:test_RevertWhen_RelistAlreadyPurchasedAsset() (gas: 188743009) -SwanTest:test_RevertWhen_RelistByAnotherSeller() (gas: 187888798) -SwanTest:test_RevertWhen_RelistInBuyPhase() (gas: 187920803) -SwanTest:test_RevertWhen_RelistInTheSameRound() (gas: 187893814) -SwanTest:test_RevertWhen_RelistInWithdrawPhase() (gas: 187920820) -SwanTest:test_SetAmountPerRound() (gas: 183801616) -SwanTest:test_SetFactories() (gas: 183318192) -SwanTest:test_SetMarketParameters() (gas: 183900237) -SwanTest:test_SetOracleParameters() (gas: 183743049) -SwanTest:test_UpdateState() (gas: 189350579) \ No newline at end of file +BuyerAgentTest:test_InBuyPhase() (gas: 4504258) +BuyerAgentTest:test_InSellPhase() (gas: 4472291) +BuyerAgentTest:test_RevertWhen_SetAmountPerRoundInBuyPhase() (gas: 4483755) +BuyerAgentTest:test_RevertWhen_SetFeeWithInvalidRoyalty() (gas: 4492886) +BuyerAgentTest:test_RevertWhen_SetRoyaltyInSellPhase() (gas: 4473243) +BuyerAgentTest:test_RevertWhen_WithdrawByAnotherOwner() (gas: 4504563) +BuyerAgentTest:test_RevertWhen_WithdrawInBuyPhase() (gas: 4511184) +BuyerAgentTest:test_SetRoyaltyAndAmountPerRound() (gas: 4494097) +BuyerAgentTest:test_WithdrawInWithdrawPhase() (gas: 4474465) +DeployTest:test_Deploy() (gas: 101342) +InvariantTest:invariant_AssetPriceRange() (runs: 256, calls: 128000, reverts: 114801) +InvariantTest:invariant_BuyerAgentFeeRoyalty() (runs: 256, calls: 128000, reverts: 114890) +InvariantTest:invariant_MaxAssetCount() (runs: 256, calls: 128000, reverts: 115004) +InvariantTest:invariant_OwnerIsAnOperator() (runs: 256, calls: 128000, reverts: 114875) +SwanFuzz:testFuzz_CalculateRoyalties(uint256,uint256,uint256) (runs: 256, μ: 4478247, ~: 4478369) +SwanFuzz:testFuzz_ChangeCycleTime(uint256,uint256,uint256,uint256,uint256,uint256) (runs: 256, μ: 6920247, ~: 6921025) +SwanFuzz:testFuzz_ListAsset(string,string,bytes,uint256,string,string,uint96,uint256) (runs: 256, μ: 3922593, ~: 3933255) +SwanFuzz:testFuzz_TransferOwnership(address) (runs: 256, μ: 45378, ~: 45378) +SwanIntervalsTest:test_InBuyPhase() (gas: 4484235) +SwanIntervalsTest:test_InSellPhase() (gas: 4472621) +SwanIntervalsTest:test_InWithdrawPhase() (gas: 4488191) +SwanTest:test_CreateBuyerAgents() (gas: 5663905) +SwanTest:test_PurchaseAnAsset() (gas: 11220979) +SwanTest:test_RelistAsset() (gas: 10183767) +SwanTest:test_RevertWhen_CreateBuyerWithInvalidRoyalty() (gas: 1619856) +SwanTest:test_RevertWhen_ListInWithdrawPhase() (gas: 5743065) +SwanTest:test_RevertWhen_ListMoreThanMaxAssetCount() (gas: 10051316) +SwanTest:test_RevertWhen_PurchaseByAnotherBuyer() (gas: 10073950) +SwanTest:test_RevertWhen_PurchaseInSellPhase() (gas: 10048903) +SwanTest:test_RevertWhen_PurchaseMoreThanAmountPerRound() (gas: 11265761) +SwanTest:test_RevertWhen_RelistAlreadyPurchasedAsset() (gas: 11222356) +SwanTest:test_RevertWhen_RelistByAnotherSeller() (gas: 10059833) +SwanTest:test_RevertWhen_RelistInBuyPhase() (gas: 10094987) +SwanTest:test_RevertWhen_RelistInTheSameRound() (gas: 10052006) +SwanTest:test_RevertWhen_RelistInWithdrawPhase() (gas: 10094678) +SwanTest:test_SetAmountPerRound() (gas: 5720554) +SwanTest:test_SetFactories() (gas: 5172073) +SwanTest:test_SetMarketParameters() (gas: 5843489) +SwanTest:test_SetOracleParameters() (gas: 5665639) +SwanTest:test_TransferOwnership() (gas: 55405) +SwanTest:test_UpdateState() (gas: 11985754) \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 5811ff8..0000000 --- a/Makefile +++ /dev/null @@ -1,73 +0,0 @@ --include .env - -.PHONY: build test local-key base-sepolia-key deploy update - -# Capture the network name -network := $(word 2, $(MAKECMDGOALS)) -contractAddress := $(word 3, $(MAKECMDGOALS)) -contractName := $(word 4, $(MAKECMDGOALS)) - -# Default to forked base-sepolia network -KEY_NAME := local-key -NETWORK_ARGS := --account local-key --sender 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --broadcast - -ifeq ($(network), base-sepolia) -KEY_NAME := base-sepolia-key -NETWORK_ARGS:= --rpc-url $(BASE_TEST_RPC_URL) --account base-sepolia-key --sender $(PUBLIC_KEY) --broadcast --verify --verifier blockscout --verifier-url https://base-sepolia.blockscout.com/api/ -endif - -# Install Dependencies -install: - forge install foundry-rs/forge-std --no-commit && forge install firstbatchxyz/dria-oracle-contracts --no-commit && forge install OpenZeppelin/openzeppelin-contracts --no-commit && forge install OpenZeppelin/openzeppelin-foundry-upgrades --no-commit && forge install OpenZeppelin/openzeppelin-contracts-upgradeable --no-commit - -# Update modules -update: - forge update - -# Build the contracts -build: - forge build - -# Generate gas snapshot -snapshot: - forge snapshot - -# Test the contracts forked base-sepolia network with 4 parallel jobs -test: - forge test --fork-url $(BASE_TEST_RPC_URL) --no-match-contract "InvariantTest" --jobs 4 - -# Run invariant tests on local network with 4 parallel jobs -test-inv: - forge test --match-contract "InvariantTest" --jobs 4 - -anvil: - anvil --fork-url $(BASE_TEST_RPC_URL) - -# Create keystores for encrypted private keys by using bls12-381 curve (https://eips.ethereum.org/EIPS/eip-2335) -key: - cast wallet import $(KEY_NAME) --interactive - -# Default to local network if no network is specified -deploy: - forge script ./script/Deploy.s.sol:Deploy $(NETWORK_ARGS) - -# Generate contract documentation under docs dir. You can also see the docs on http://localhost:4000 -doc: - forge doc - -# Format code -fmt: - forge fmt - -# Coverage -cov: - forge coverage --no-match-coverage "(test|mock|script)" --jobs 4 - -# Verify contract on blockscout -verify: - forge verify-contract $(contractAddress) src/$(contractName).sol:$(contractName) --verifier blockscout --verifier-url https://base-sepolia.blockscout.com/api/ - -# Prevent make from interpreting params as a target -$(eval $(network):;@:) -$(eval $(contractAddress):;@:) -$(eval $(contractName):;@:) \ No newline at end of file diff --git a/README.md b/README.md index 10ed460..7c70a04 100644 --- a/README.md +++ b/README.md @@ -2,33 +2,35 @@ Swan is a **Decentralized Protocol** where AI agents (buyers) dynamically interact with asset creators. Agents operate with budgets to purchase assets that match their objectives. Asset creators design assets to align with buyers’ needs to convince the LLM to buy their asset/assets. ## Compile + Compile the contracts with: ```sh -make build +forge build ``` > [!NOTE] > -> Please prepare a valid `.env` according to `.env.example` before running tests. +> Openzeppelin' foundry modules expect that running `forge clean` before running Foundry script or test or include `--force` option when running `forge script` or `forge test`. ## Test -Run tests on forked base-sepolia with: +Run tests on local: ```sh -make test +forge test --force ``` -Run invariant tests on local with: +or on any other evm chain: + ```sh -make test-inv +forge test --rpc-url ``` ## Deployment **Step 1.** -Import your `PUBLIC_KEY` and `ETHERSCAN_API_KEY` to env file. +Import your `ETHERSCAN_API_KEY` to env file. > [!NOTE] > @@ -38,13 +40,12 @@ Import your `PUBLIC_KEY` and `ETHERSCAN_API_KEY` to env file. Create keystores for deployment. [See more for keystores](https://eips.ethereum.org/EIPS/eip-2335) ```sh -make local-key +cast wallet import --interactive ``` - -or for Base Sepolia +You can see your wallets with: ```sh -make base-sepolia-key +cast wallet list ``` > [!NOTE] @@ -53,33 +54,39 @@ make base-sepolia-key > You HAVE to type your password on the terminal to be able to use your keys. (e.g when deploying a contract) **Step 3.** -Enter your private key (associated with the public key you added to env file) and password on terminal. You'll see your public key on terminal. +Enter your private key (associated with your public key) and password on terminal. You'll see your public key on terminal. > [!NOTE] > -> If you want to deploy contracts on localhost please provide localhost public key for the command above. +> If you want to deploy contracts on localhost please provide local public key for the command above. **Step 4.** Required only for local deployment. Start a local node with: ```sh -make anvil +anvil ``` **Step 5.** -Deploy the contracts on localhost (forked Base Sepolia by default) using Deploy script: +Deploy the contracts with: ```sh -make deploy +forge script ./script/Deploy.s.sol:Deploy --rpc-url --account --sender --broadcast ``` - -or Base Sepolia with the command below: +or for instant verification use: ```sh -make deploy base-sepolia +forge script ./script/Deploy.s.sol:Deploy --rpc-url --account --sender --broadcast --verify --verifier --verifier-url ``` +> [!NOTE] +> `` should be expolorer's homepage url. Forge reads your `` from .env file so you don't need to add this at the end of ``. +> +> e.g. +> `https://base-sepolia.blockscout.com/api/` for `Base Sepolia Network` +> + You can see deployed contract addresses under the `deployment/.json` ## Verify Contract @@ -87,19 +94,20 @@ You can see deployed contract addresses under the `deployment/.json` Verify contract manually with: ```sh -make verify base-sepolia +forge verify-contract src/$.sol: --verifier --verifier-url ``` + ## Coverage Check coverages with: ```sh -bash coverage.sh +forge clean && bash coverage.sh ``` or to see summarized coverages on terminal: ```sh -make cov +forge clean && forge coverage --no-match-coverage "(test|mock|script)" ``` You can see coverages under the coverage directory. @@ -109,43 +117,43 @@ You can see coverages under the coverage directory. Get storage layout with: ```sh -bash storage.sh +forge clean && bash storage.sh ``` You can see storage layouts under the storage directory. -## Format +## Gas Snapshot -Format code with: +Take the gas snapshot with: ```sh -make fmt +forge clean && forge snapshot ``` -## Update +You can see the snapshot `.gas-snapshot` file in the current directory. -Update modules with: +## Format + +Format code with: ```sh -make update +forge fmt ``` -## Gas Snapshot +## Generate documentation -Take the gas snapshot with: +Generate documentation with: ```sh -make snapshot +forge doc ``` -You can see the snapshot `.gas-snapshot` file in the current directory. - -## Generate documentation +## Update -Generate documentation with: +Update modules with: ```sh -make doc +forge update ``` You can see the documentation under the `docs/` directory. diff --git a/deployment/84532.json b/deployment/84532.json index ee38453..419a160 100644 --- a/deployment/84532.json +++ b/deployment/84532.json @@ -1,16 +1,16 @@ { "LLMOracleRegistry": { - "proxyAddr": "0x90193c961a926261b756d1e5bb255e67ff9498a1", - "implAddr": "0x34a1d3fff3958843c43ad80f30b94c510645c316" + "proxyAddr": "0x4e4ef93f3ac35ca6505f582c666958f99218de21", + "implAddr": "0xa826dfee9089004d9a6d832f854375eb725074bb" }, "LLMOracleCoordinator": { - "proxyAddr": "0xbb2180ebd78ce97360503434ed37fcf4a1df61c3", - "implAddr": "0xa8452ec99ce0c64f20701db7dd3abdb607c00496" + "proxyAddr": "0x237f1bda05451ade6214a12e85b5084511da2995", + "implAddr": "0x4a2d4f8734c4b322685fadfc72e44f0011123814" }, "Swan": { - "proxyAddr": "0xdeb1e9a6be7baf84208bb6e10ac9f9bbe1d70809", - "implAddr": "0x62c20aa1e0272312bc100b4e23b4dc1ed96dd7d1" + "proxyAddr": "0x70c85509fc1da642e90d8dc5a9487fa4c36ea77c", + "implAddr": "0x1f5bff2d013fe0051a7f1d1b932183c3d839d384" }, - "BuyerAgentFactory": "0xdb8cff278adccf9e9b5da745b44e754fc4ee3c76", - "SwanAssetFactory": "0x50eef481cae4250d252ae577a09bf514f224c6c4" + "BuyerAgentFactory": "0xc48af3ef03d91af34b891688ade004ad36c8c39a", + "SwanAssetFactory": "0xebb2c54b2a20e0e25b2fb168c8a657e1c966911f" } \ No newline at end of file diff --git a/docs/src/README.md b/docs/src/README.md index 10ed460..7c70a04 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -2,33 +2,35 @@ Swan is a **Decentralized Protocol** where AI agents (buyers) dynamically interact with asset creators. Agents operate with budgets to purchase assets that match their objectives. Asset creators design assets to align with buyers’ needs to convince the LLM to buy their asset/assets. ## Compile + Compile the contracts with: ```sh -make build +forge build ``` > [!NOTE] > -> Please prepare a valid `.env` according to `.env.example` before running tests. +> Openzeppelin' foundry modules expect that running `forge clean` before running Foundry script or test or include `--force` option when running `forge script` or `forge test`. ## Test -Run tests on forked base-sepolia with: +Run tests on local: ```sh -make test +forge test --force ``` -Run invariant tests on local with: +or on any other evm chain: + ```sh -make test-inv +forge test --rpc-url ``` ## Deployment **Step 1.** -Import your `PUBLIC_KEY` and `ETHERSCAN_API_KEY` to env file. +Import your `ETHERSCAN_API_KEY` to env file. > [!NOTE] > @@ -38,13 +40,12 @@ Import your `PUBLIC_KEY` and `ETHERSCAN_API_KEY` to env file. Create keystores for deployment. [See more for keystores](https://eips.ethereum.org/EIPS/eip-2335) ```sh -make local-key +cast wallet import --interactive ``` - -or for Base Sepolia +You can see your wallets with: ```sh -make base-sepolia-key +cast wallet list ``` > [!NOTE] @@ -53,33 +54,39 @@ make base-sepolia-key > You HAVE to type your password on the terminal to be able to use your keys. (e.g when deploying a contract) **Step 3.** -Enter your private key (associated with the public key you added to env file) and password on terminal. You'll see your public key on terminal. +Enter your private key (associated with your public key) and password on terminal. You'll see your public key on terminal. > [!NOTE] > -> If you want to deploy contracts on localhost please provide localhost public key for the command above. +> If you want to deploy contracts on localhost please provide local public key for the command above. **Step 4.** Required only for local deployment. Start a local node with: ```sh -make anvil +anvil ``` **Step 5.** -Deploy the contracts on localhost (forked Base Sepolia by default) using Deploy script: +Deploy the contracts with: ```sh -make deploy +forge script ./script/Deploy.s.sol:Deploy --rpc-url --account --sender --broadcast ``` - -or Base Sepolia with the command below: +or for instant verification use: ```sh -make deploy base-sepolia +forge script ./script/Deploy.s.sol:Deploy --rpc-url --account --sender --broadcast --verify --verifier --verifier-url ``` +> [!NOTE] +> `` should be expolorer's homepage url. Forge reads your `` from .env file so you don't need to add this at the end of ``. +> +> e.g. +> `https://base-sepolia.blockscout.com/api/` for `Base Sepolia Network` +> + You can see deployed contract addresses under the `deployment/.json` ## Verify Contract @@ -87,19 +94,20 @@ You can see deployed contract addresses under the `deployment/.json` Verify contract manually with: ```sh -make verify base-sepolia +forge verify-contract src/$.sol: --verifier --verifier-url ``` + ## Coverage Check coverages with: ```sh -bash coverage.sh +forge clean && bash coverage.sh ``` or to see summarized coverages on terminal: ```sh -make cov +forge clean && forge coverage --no-match-coverage "(test|mock|script)" ``` You can see coverages under the coverage directory. @@ -109,43 +117,43 @@ You can see coverages under the coverage directory. Get storage layout with: ```sh -bash storage.sh +forge clean && bash storage.sh ``` You can see storage layouts under the storage directory. -## Format +## Gas Snapshot -Format code with: +Take the gas snapshot with: ```sh -make fmt +forge clean && forge snapshot ``` -## Update +You can see the snapshot `.gas-snapshot` file in the current directory. -Update modules with: +## Format + +Format code with: ```sh -make update +forge fmt ``` -## Gas Snapshot +## Generate documentation -Take the gas snapshot with: +Generate documentation with: ```sh -make snapshot +forge doc ``` -You can see the snapshot `.gas-snapshot` file in the current directory. - -## Generate documentation +## Update -Generate documentation with: +Update modules with: ```sh -make doc +forge update ``` You can see the documentation under the `docs/` directory. diff --git a/docs/src/src/BuyerAgent.sol/contract.BuyerAgent.md b/docs/src/src/BuyerAgent.sol/contract.BuyerAgent.md index 1f81dce..5823cfb 100644 --- a/docs/src/src/BuyerAgent.sol/contract.BuyerAgent.md +++ b/docs/src/src/BuyerAgent.sol/contract.BuyerAgent.md @@ -1,5 +1,5 @@ # BuyerAgent -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/BuyerAgent.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/BuyerAgent.sol) **Inherits:** Ownable diff --git a/docs/src/src/BuyerAgent.sol/contract.BuyerAgentFactory.md b/docs/src/src/BuyerAgent.sol/contract.BuyerAgentFactory.md index d00c431..d943e66 100644 --- a/docs/src/src/BuyerAgent.sol/contract.BuyerAgentFactory.md +++ b/docs/src/src/BuyerAgent.sol/contract.BuyerAgentFactory.md @@ -1,5 +1,5 @@ # BuyerAgentFactory -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/BuyerAgent.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/BuyerAgent.sol) Factory contract to deploy BuyerAgent contracts. diff --git a/docs/src/src/Swan.sol/constants.Swan.md b/docs/src/src/Swan.sol/constants.Swan.md index 84c2815..3efa13b 100644 --- a/docs/src/src/Swan.sol/constants.Swan.md +++ b/docs/src/src/Swan.sol/constants.Swan.md @@ -1,5 +1,5 @@ # Constants -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/Swan.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/Swan.sol) ### SwanBuyerPurchaseOracleProtocol diff --git a/docs/src/src/Swan.sol/contract.Swan.md b/docs/src/src/Swan.sol/contract.Swan.md index 143a5b3..e9878ba 100644 --- a/docs/src/src/Swan.sol/contract.Swan.md +++ b/docs/src/src/Swan.sol/contract.Swan.md @@ -1,5 +1,5 @@ # Swan -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/Swan.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/Swan.sol) **Inherits:** [SwanManager](/src/SwanManager.sol/abstract.SwanManager.md), UUPSUpgradeable diff --git a/docs/src/src/SwanAsset.sol/contract.SwanAsset.md b/docs/src/src/SwanAsset.sol/contract.SwanAsset.md index 03a88b9..145ac7f 100644 --- a/docs/src/src/SwanAsset.sol/contract.SwanAsset.md +++ b/docs/src/src/SwanAsset.sol/contract.SwanAsset.md @@ -1,5 +1,5 @@ # SwanAsset -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/SwanAsset.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/SwanAsset.sol) **Inherits:** ERC721, Ownable diff --git a/docs/src/src/SwanAsset.sol/contract.SwanAssetFactory.md b/docs/src/src/SwanAsset.sol/contract.SwanAssetFactory.md index d2b1f9a..43a6a69 100644 --- a/docs/src/src/SwanAsset.sol/contract.SwanAssetFactory.md +++ b/docs/src/src/SwanAsset.sol/contract.SwanAssetFactory.md @@ -1,5 +1,5 @@ # SwanAssetFactory -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/SwanAsset.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/SwanAsset.sol) Factory contract to deploy SwanAsset tokens. diff --git a/docs/src/src/SwanManager.sol/abstract.SwanManager.md b/docs/src/src/SwanManager.sol/abstract.SwanManager.md index 779f276..5306a32 100644 --- a/docs/src/src/SwanManager.sol/abstract.SwanManager.md +++ b/docs/src/src/SwanManager.sol/abstract.SwanManager.md @@ -1,5 +1,5 @@ # SwanManager -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/SwanManager.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/SwanManager.sol) **Inherits:** OwnableUpgradeable diff --git a/docs/src/src/SwanManager.sol/struct.SwanMarketParameters.md b/docs/src/src/SwanManager.sol/struct.SwanMarketParameters.md index c861e63..28f99d3 100644 --- a/docs/src/src/SwanManager.sol/struct.SwanMarketParameters.md +++ b/docs/src/src/SwanManager.sol/struct.SwanMarketParameters.md @@ -1,5 +1,5 @@ # SwanMarketParameters -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/SwanManager.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/SwanManager.sol) Collection of market-related parameters. diff --git a/docs/src/src/mock/SvanV2.sol/contract.SwanV2.md b/docs/src/src/mock/SvanV2.sol/contract.SwanV2.md index 54d7227..5604372 100644 --- a/docs/src/src/mock/SvanV2.sol/contract.SwanV2.md +++ b/docs/src/src/mock/SvanV2.sol/contract.SwanV2.md @@ -1,5 +1,5 @@ # SwanV2 -[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/b941dcd71134f5be2e73ec6ee0a8aa50cf333ffb/src/mock/SvanV2.sol) +[Git Source](https://github.com/firstbatchxyz/swan-contracts/blob/170a81d7fdcb6e8e1e1df26e3a5bd45ec4316d4a/src/mock/SvanV2.sol) **Inherits:** [Swan](/src/Swan.sol/contract.Swan.md) diff --git a/lcov.info b/lcov.info index b5cb06e..9971e5c 100644 --- a/lcov.info +++ b/lcov.info @@ -1,684 +1,371 @@ TN: -SF:contracts/libraries/Statistics.sol -FN:8,Statistics.avg -FNDA:13,Statistics.avg -DA:9,13 -DA:10,13 -DA:11,16 -DA:13,13 -FN:18,Statistics.variance -FNDA:13,Statistics.variance -DA:19,13 -DA:20,13 -DA:21,13 -DA:22,16 -DA:23,16 -DA:25,13 -FN:31,Statistics.stddev -FNDA:13,Statistics.stddev -DA:32,13 -DA:33,13 -DA:34,13 -FN:40,Statistics.sqrt -FNDA:13,Statistics.sqrt -DA:41,13 -DA:42,13 -DA:43,13 -DA:44,0 -DA:45,0 -FNF:4 -FNH:4 -LF:18 -LH:16 -BRF:0 -BRH:0 -end_of_record -TN: -SF:contracts/llm/LLMOracleCoordinator.sol -FN:81,LLMOracleCoordinator.onlyRegistered -FNDA:9,LLMOracleCoordinator.onlyRegistered -DA:82,9 -BRDA:82,0,0,- -DA:83,0 -FN:89,LLMOracleCoordinator.onlyAtStatus -FNDA:9,LLMOracleCoordinator.onlyAtStatus -DA:90,9 -BRDA:90,1,0,- -DA:91,0 -FN:103,LLMOracleCoordinator. -FNDA:39,LLMOracleCoordinator. -DA:104,39 -FN:113,LLMOracleCoordinator._authorizeUpgrade -FNDA:0,LLMOracleCoordinator._authorizeUpgrade -FN:124,LLMOracleCoordinator.initialize -FNDA:39,LLMOracleCoordinator.initialize -DA:131,39 -DA:132,39 -DA:133,39 -DA:134,39 -FN:149,LLMOracleCoordinator.request -FNDA:8,LLMOracleCoordinator.request -DA:155,8 -DA:158,8 -DA:159,8 -BRDA:159,2,0,- -DA:160,0 -DA:164,8 -DA:165,8 -BRDA:165,3,0,- -DA:166,0 -DA:170,8 -DA:173,8 -DA:175,8 -DA:177,8 -DA:180,8 -DA:191,8 -DA:193,8 -FN:206,LLMOracleCoordinator.respond -FNDA:15,LLMOracleCoordinator.respond -DA:211,11 -DA:214,11 -DA:215,3 -BRDA:215,4,0,1 -DA:216,1 -DA:221,10 -DA:224,10 -DA:226,10 -DA:229,10 -DA:232,10 -BRDA:232,5,0,2 -DA:233,2 -DA:237,10 -DA:238,8 -BRDA:238,6,0,8 -DA:239,8 -BRDA:239,7,0,1 -BRDA:239,7,1,7 -DA:241,1 -DA:242,1 -DA:245,7 -DA:246,7 -FN:259,LLMOracleCoordinator.validate -FNDA:9,LLMOracleCoordinator.validate -DA:264,9 -DA:267,9 -BRDA:267,8,0,- -DA:268,0 -DA:272,9 -DA:273,12 -BRDA:273,9,0,1 -DA:274,1 -DA:279,8 -DA:280,2 -BRDA:280,10,0,1 -DA:281,1 -DA:286,7 -DA:289,7 -DA:294,7 -DA:297,7 -DA:298,6 -BRDA:298,11,0,6 -DA:299,6 -DA:300,6 -DA:303,6 -FN:312,LLMOracleCoordinator.assertValidNonce -FNDA:17,LLMOracleCoordinator.assertValidNonce -DA:313,17 -DA:314,17 -BRDA:314,12,0,- -DA:315,0 -FN:322,LLMOracleCoordinator.finalizeValidation -FNDA:6,LLMOracleCoordinator.finalizeValidation -DA:323,6 -DA:326,6 -DA:328,7 -DA:329,7 -DA:330,9 -DA:334,7 -DA:338,7 -DA:339,7 -DA:340,7 -DA:341,9 -DA:342,9 -BRDA:342,13,0,9 -DA:343,9 -DA:344,9 -DA:347,9 -DA:352,7 -DA:353,7 -DA:358,6 -DA:359,6 -DA:360,7 -DA:364,6 -DA:365,6 -DA:367,7 -BRDA:367,14,0,7 -DA:368,7 -FN:374,LLMOracleCoordinator.withdrawPlatformFees -FNDA:0,LLMOracleCoordinator.withdrawPlatformFees -DA:375,0 -FN:381,LLMOracleCoordinator.getResponses -FNDA:0,LLMOracleCoordinator.getResponses -DA:382,0 -FN:388,LLMOracleCoordinator.getValidations -FNDA:0,LLMOracleCoordinator.getValidations -DA:389,0 -FN:395,LLMOracleCoordinator._increaseAllowance -FNDA:18,LLMOracleCoordinator._increaseAllowance -DA:396,18 -FN:403,LLMOracleCoordinator.getBestResponse -FNDA:5,LLMOracleCoordinator.getBestResponse -DA:404,5 -DA:407,5 -BRDA:407,15,0,- -DA:408,0 -DA:412,5 -DA:413,5 -DA:414,5 -DA:415,0 -BRDA:415,16,0,- -DA:416,0 -DA:417,0 -DA:421,5 -FNF:15 -FNH:11 -LF:97 -LH:84 -BRF:18 -BRH:10 -end_of_record -TN: -SF:contracts/llm/LLMOracleManager.sol -FN:47,LLMOracleManager.__LLMOracleManager_init -FNDA:39,LLMOracleManager.__LLMOracleManager_init -DA:51,39 -DA:52,39 -FN:55,LLMOracleManager.__LLMOracleManager_init_unchained -FNDA:39,LLMOracleManager.__LLMOracleManager_init_unchained -DA:59,39 -DA:60,39 -DA:62,39 -DA:63,39 -DA:65,39 -FN:73,LLMOracleManager.onlyValidParameters -FNDA:8,LLMOracleManager.onlyValidParameters -DA:75,8 -DA:76,0 -BRDA:76,0,0,- -DA:77,0 -DA:83,8 -DA:84,8 -DA:85,0 -BRDA:85,1,0,- -DA:86,0 -DA:92,8 -DA:93,8 -DA:94,0 -BRDA:94,2,0,- -DA:95,0 -FN:107,LLMOracleManager.setFees -FNDA:0,LLMOracleManager.setFees -DA:108,39 -DA:109,39 -DA:110,39 -FN:118,LLMOracleManager.getFee -FNDA:4,LLMOracleManager.getFee -DA:123,12 -DA:124,12 -DA:125,12 -DA:126,12 -FN:134,LLMOracleManager.setParameters -FNDA:0,LLMOracleManager.setParameters -DA:138,0 -DA:139,0 -FN:146,LLMOracleManager.setDeviationFactors -FNDA:0,LLMOracleManager.setDeviationFactors -DA:150,0 -DA:151,0 -FNF:7 -FNH:4 -LF:29 -LH:19 -BRF:3 -BRH:0 -end_of_record -TN: -SF:contracts/llm/LLMOracleRegistry.sol -FN:64,LLMOracleRegistry. -FNDA:47,LLMOracleRegistry. -DA:65,47 -FN:74,LLMOracleRegistry._authorizeUpgrade -FNDA:0,LLMOracleRegistry._authorizeUpgrade -FN:77,LLMOracleRegistry.initialize -FNDA:47,LLMOracleRegistry.initialize -DA:81,47 -DA:82,47 -DA:83,47 -DA:84,47 -FN:94,LLMOracleRegistry.register -FNDA:106,LLMOracleRegistry.register -DA:95,106 -DA:98,106 -BRDA:98,0,0,1 -DA:99,1 -DA:103,105 -BRDA:103,1,0,1 -DA:104,1 -DA:106,104 -DA:109,104 -DA:110,104 -FN:117,LLMOracleRegistry.unregister -FNDA:5,LLMOracleRegistry.unregister -DA:118,5 -DA:121,5 -BRDA:121,2,0,1 -DA:122,1 -DA:126,4 -DA:127,4 -DA:130,4 -FN:135,LLMOracleRegistry.setStakeAmounts -FNDA:0,LLMOracleRegistry.setStakeAmounts -DA:136,0 -DA:137,0 -FN:141,LLMOracleRegistry.getStakeAmount -FNDA:0,LLMOracleRegistry.getStakeAmount -DA:142,106 -FN:146,LLMOracleRegistry.isRegistered -FNDA:130,LLMOracleRegistry.isRegistered -DA:147,236 -FNF:8 -FNH:5 -LF:23 -LH:21 -BRF:3 -BRH:3 -end_of_record -TN: -SF:contracts/swan/BuyerAgent.sol -FN:13,BuyerAgentFactory.deploy -FNDA:62,BuyerAgentFactory.deploy -DA:20,62 -FN:106,BuyerAgent.onlyAuthorized +SF:src/BuyerAgent.sol +DA:12,9474 +FN:12,BuyerAgentFactory.deploy +FNDA:9474,BuyerAgentFactory.deploy +DA:19,9474 +DA:121,1 +FN:121,BuyerAgent.onlyAuthorized FNDA:1,BuyerAgent.onlyAuthorized -DA:108,1 -BRDA:108,0,0,- -DA:109,0 -FN:121,BuyerAgent. -FNDA:62,BuyerAgent. -DA:129,62 -BRDA:129,1,0,1 -DA:130,1 -DA:132,61 -DA:134,61 -DA:135,61 -DA:136,61 -DA:137,61 -DA:138,61 -DA:139,61 -DA:143,61 -DA:144,61 -FN:149,BuyerAgent.onERC721Received -FNDA:4,BuyerAgent.onERC721Received -DA:150,4 -FN:159,BuyerAgent.minFundAmount +DA:123,1 +BRDA:123,0,0,- +DA:124,0 +DA:136,9474 +FN:136,BuyerAgent.constructor +FNDA:9474,BuyerAgent.constructor +DA:144,9468 +DA:146,9468 +BRDA:146,1,0,177 +DA:147,177 +DA:150,1594 +DA:151,1594 +DA:152,1594 +DA:153,1594 +DA:154,1594 +DA:155,1594 +DA:159,1594 +DA:160,1594 +DA:169,0 +FN:169,BuyerAgent.minFundAmount FNDA:0,BuyerAgent.minFundAmount -DA:161,1 -FN:166,BuyerAgent.oracleResult +DA:170,1 +DA:175,0 +FN:175,BuyerAgent.oracleResult FNDA:0,BuyerAgent.oracleResult -DA:168,5 -BRDA:168,2,0,- -DA:169,0 -DA:172,5 -FN:182,BuyerAgent.oracleStateRequest +DA:177,5 +BRDA:177,2,0,- +DA:178,0 +DA:181,5 +DA:191,1 +FN:191,BuyerAgent.oracleStateRequest FNDA:1,BuyerAgent.oracleStateRequest -DA:184,1 -DA:186,1 -FN:197,BuyerAgent.oraclePurchaseRequest +DA:193,1 +DA:195,1 +DA:198,1 +DA:208,4 +FN:208,BuyerAgent.oraclePurchaseRequest FNDA:4,BuyerAgent.oraclePurchaseRequest -DA:199,4 -DA:201,4 -FN:208,BuyerAgent.updateState +DA:210,4 +DA:212,4 +DA:215,4 +DA:221,1 +FN:221,BuyerAgent.updateState FNDA:1,BuyerAgent.updateState -DA:210,1 -DA:213,1 -DA:214,0 -BRDA:214,3,0,- -DA:215,0 -DA:219,1 -DA:220,1 DA:223,1 -FN:230,BuyerAgent.purchase +DA:226,1 +DA:227,0 +BRDA:227,3,0,- +DA:228,0 +DA:232,1 +DA:233,1 +DA:236,1 +DA:238,1 +DA:245,6 +FN:245,BuyerAgent.purchase FNDA:6,BuyerAgent.purchase -DA:232,5 -DA:235,4 -DA:236,0 -BRDA:236,4,0,- -DA:237,0 -DA:241,4 -DA:242,4 -DA:245,4 -DA:246,5 -DA:249,5 -DA:250,5 -DA:251,5 -BRDA:251,5,0,1 -DA:252,1 +DA:247,5 +DA:250,4 +DA:251,0 +BRDA:251,4,0,- +DA:252,0 DA:256,4 -DA:259,4 -DA:263,3 -FN:270,BuyerAgent.withdraw +DA:257,4 +DA:260,4 +DA:261,5 +DA:264,5 +DA:265,5 +DA:266,5 +BRDA:266,5,0,1 +DA:267,1 +DA:271,4 +DA:274,4 +DA:278,3 +DA:280,3 +DA:287,3 +FN:287,BuyerAgent.withdraw FNDA:3,BuyerAgent.withdraw -DA:271,2 -DA:275,2 -BRDA:275,6,0,1 -DA:278,1 -BRDA:278,7,0,1 -DA:279,1 -DA:284,1 -FN:289,BuyerAgent.treasury +DA:288,2 +DA:292,2 +BRDA:292,6,0,1 +DA:295,1 +BRDA:295,7,0,1 +DA:296,1 +DA:301,1 +DA:306,1 +FN:306,BuyerAgent.treasury FNDA:1,BuyerAgent.treasury -DA:290,2 -FN:295,BuyerAgent._checkRoundPhase +DA:307,2 +DA:312,18 +FN:312,BuyerAgent._checkRoundPhase FNDA:18,BuyerAgent._checkRoundPhase -DA:296,18 -DA:297,18 -BRDA:297,8,0,3 -DA:298,3 -DA:301,15 -FN:308,BuyerAgent._computeCycleTime -FNDA:84,BuyerAgent._computeCycleTime -DA:309,84 -FN:316,BuyerAgent._computePhase -FNDA:84,BuyerAgent._computePhase -DA:321,84 -DA:322,84 -DA:323,84 -DA:328,84 -BRDA:328,9,0,49 -BRDA:328,9,1,13 -DA:329,49 -DA:330,35 -BRDA:330,10,0,22 -BRDA:330,10,1,13 -DA:331,22 -DA:333,13 -FN:342,BuyerAgent.getRoundPhase -FNDA:58,BuyerAgent.getRoundPhase -DA:343,78 -DA:345,78 -BRDA:345,11,0,73 -BRDA:345,11,1,5 -DA:348,73 -DA:351,5 -DA:355,5 -DA:356,5 -DA:360,6 -DA:363,1 -DA:364,1 -DA:367,1 -DA:369,1 -DA:375,5 -DA:376,5 -DA:378,5 -DA:379,5 -FN:387,BuyerAgent.setFeeRoyalty +DA:313,18 +DA:314,18 +BRDA:314,8,0,3 +DA:315,3 +DA:318,15 +DA:325,3179 +FN:325,BuyerAgent._computeCycleTime +FNDA:3179,BuyerAgent._computeCycleTime +DA:326,3179 +DA:333,3179 +FN:333,BuyerAgent._computePhase +FNDA:3179,BuyerAgent._computePhase +DA:338,3179 +DA:339,3179 +DA:340,3179 +DA:345,3179 +BRDA:345,9,0,1596 +BRDA:345,9,1,23 +DA:346,1596 +DA:347,1583 +BRDA:347,10,0,1560 +BRDA:347,10,1,23 +DA:348,1560 +DA:350,23 +DA:359,1879 +FN:359,BuyerAgent.getRoundPhase +FNDA:1879,BuyerAgent.getRoundPhase +DA:360,1899 +DA:362,1899 +BRDA:362,11,0,875 +BRDA:362,11,1,1024 +DA:365,875 +DA:368,1024 +DA:372,1024 +DA:373,1024 +DA:377,1280 +DA:380,256 +DA:381,256 +DA:384,256 +DA:385,256 +DA:391,1024 +DA:392,1024 +DA:394,1024 +DA:396,1024 +DA:404,4 +FN:404,BuyerAgent.setFeeRoyalty FNDA:4,BuyerAgent.setFeeRoyalty -DA:388,4 -DA:390,3 -BRDA:390,12,0,2 -DA:391,2 -DA:393,1 -FN:400,BuyerAgent.setAmountPerRound +DA:405,4 +DA:407,3 +BRDA:407,12,0,2 +DA:408,2 +DA:410,1 +DA:417,3 +FN:417,BuyerAgent.setAmountPerRound FNDA:3,BuyerAgent.setAmountPerRound -DA:401,3 -DA:403,2 -FNF:18 -FNH:16 -LF:85 -LH:79 +DA:418,3 +DA:420,2 +FNF:17 +FNH:15 +LF:105 +LH:97 BRF:16 BRH:12 end_of_record TN: -SF:contracts/swan/Swan.sol -FN:108,Swan. -FNDA:34,Swan. -DA:109,34 -FN:114,Swan.onERC721Received -FNDA:4,Swan.onERC721Received -DA:115,4 -FN:125,Swan._authorizeUpgrade +SF:src/Swan.sol +DA:116,41 +FN:116,Swan.constructor +FNDA:41,Swan.constructor +DA:117,41 +DA:127,0 +FN:127,Swan._authorizeUpgrade FNDA:0,Swan._authorizeUpgrade -FN:130,Swan.initialize -FNDA:34,Swan.initialize -DA:139,34 -DA:141,34 -BRDA:141,0,0,- -BRDA:141,0,1,34 -DA:144,34 -DA:145,34 -DA:148,34 -DA:149,34 -DA:150,34 -DA:151,34 -DA:154,34 -DA:156,34 -FN:169,Swan.list -FNDA:38,Swan.list -DA:172,38 -DA:173,38 -DA:176,38 -BRDA:176,1,0,1 -DA:177,1 -DA:180,37 -BRDA:180,2,0,1 -DA:181,1 -DA:184,36 -BRDA:184,3,0,- -DA:185,0 -DA:189,36 -DA:190,36 -DA:201,36 -DA:204,36 -DA:206,36 -FN:213,Swan.relist -FNDA:6,Swan.relist -DA:214,6 -DA:217,6 -BRDA:217,4,0,1 -DA:218,1 -DA:222,5 -BRDA:222,5,0,1 -DA:223,1 -DA:233,4 -DA:234,4 -BRDA:234,6,0,1 -DA:235,1 -DA:239,3 -DA:240,3 -DA:243,3 -BRDA:243,7,0,2 -DA:244,2 -DA:248,1 -DA:249,1 -BRDA:249,8,0,- -DA:250,0 -DA:254,1 -DA:265,1 -DA:268,1 -DA:270,1 -FN:274,Swan.transferRoyalties -FNDA:37,Swan.transferRoyalties -DA:276,37 -DA:277,37 -DA:281,37 -DA:284,37 -DA:287,37 -FN:292,Swan.purchase -FNDA:4,Swan.purchase -DA:293,4 -DA:296,4 -BRDA:296,9,0,- -DA:297,0 -DA:301,4 -BRDA:301,10,0,- -DA:302,0 -DA:306,4 -DA:310,4 -DA:311,4 -DA:314,4 -DA:315,4 -DA:317,4 -FN:324,Swan.getListingPrice +DA:132,7673 +FN:132,Swan.initialize +FNDA:7673,Swan.initialize +DA:141,41 +DA:143,41 +BRDA:143,0,0,- +BRDA:143,0,1,41 +DA:146,41 +DA:147,41 +DA:150,41 +DA:151,41 +DA:152,41 +DA:153,41 +DA:156,41 +DA:158,41 +DA:164,7993 +FN:164,Swan.transferOwnership +FNDA:7993,Swan.transferOwnership +DA:165,258 +BRDA:165,1,0,1 +DA:166,1 +DA:169,257 +DA:172,257 +DA:175,257 +DA:185,9299 +FN:185,Swan.createBuyer +FNDA:9299,Swan.createBuyer +DA:191,9299 +DA:192,1594 +DA:194,1594 +DA:203,8123 +FN:203,Swan.list +FNDA:8123,Swan.list +DA:206,8123 +DA:207,8123 +DA:210,306 +BRDA:210,2,0,1 +DA:211,1 +DA:214,305 +BRDA:214,3,0,1 +DA:215,1 +DA:218,304 +BRDA:218,4,0,12 +DA:219,12 +DA:223,292 +DA:224,292 +DA:235,292 +DA:238,292 +DA:240,292 +DA:247,7852 +FN:247,Swan.relist +FNDA:7852,Swan.relist +DA:248,7852 +DA:251,7852 +BRDA:251,5,0,7846 +DA:252,7846 +DA:256,6 +BRDA:256,6,0,1 +DA:257,1 +DA:267,5 +DA:268,5 +BRDA:268,7,0,1 +DA:269,1 +DA:273,4 +BRDA:273,8,0,1 +DA:274,1 +DA:278,3 +DA:279,3 +DA:282,3 +BRDA:282,9,0,2 +DA:283,2 +DA:287,1 +DA:288,1 +BRDA:288,10,0,- +DA:289,0 +DA:293,1 +DA:304,1 +DA:307,1 +DA:309,1 +DA:313,293 +FN:313,Swan.transferRoyalties +FNDA:293,Swan.transferRoyalties +DA:315,293 +DA:316,293 +DA:317,293 +DA:321,293 +DA:324,293 +DA:327,293 +DA:332,7893 +FN:332,Swan.purchase +FNDA:7893,Swan.purchase +DA:333,7893 +DA:336,7893 +BRDA:336,11,0,7889 +DA:337,7889 +DA:341,4 +BRDA:341,12,0,- +DA:342,0 +DA:346,4 +DA:350,4 +DA:351,4 +DA:354,4 +DA:355,4 +DA:357,4 +DA:364,7843 +FN:364,Swan.setFactories +FNDA:7843,Swan.setFactories +DA:365,1 +DA:366,1 +DA:370,5 +FN:370,Swan.getListingPrice FNDA:5,Swan.getListingPrice -DA:325,5 -FN:330,Swan.getListedAssets -FNDA:22,Swan.getListedAssets -DA:331,22 -FN:335,Swan.getListing -FNDA:2,Swan.getListing -DA:336,2 -FN:342,Swan.createBuyer -FNDA:62,Swan.createBuyer -DA:348,62 -DA:349,61 -DA:351,61 -FNF:12 -FNH:11 -LF:66 -LH:62 -BRF:12 -BRH:7 +DA:371,5 +DA:375,278 +FN:375,Swan.getListedAssets +FNDA:278,Swan.getListedAssets +DA:376,278 +DA:380,294 +FN:380,Swan.getListing +FNDA:294,Swan.getListing +DA:381,294 +FNF:13 +FNH:12 +LF:88 +LH:85 +BRF:14 +BRH:11 end_of_record TN: -SF:contracts/swan/SwanAsset.sol +SF:src/SwanAsset.sol +DA:11,8228 FN:11,SwanAssetFactory.deploy -FNDA:36,SwanAssetFactory.deploy -DA:15,36 -FN:27,SwanAsset. -FNDA:36,SwanAsset. -DA:34,36 -DA:35,36 -DA:38,36 -DA:41,36 +FNDA:8228,SwanAssetFactory.deploy +DA:15,8228 +DA:27,8228 +FN:27,SwanAsset.constructor +FNDA:8228,SwanAsset.constructor +DA:34,8217 +DA:35,8217 +DA:38,8217 +DA:41,8203 FNF:2 FNH:2 -LF:5 -LH:5 +LF:7 +LH:7 BRF:0 BRH:0 end_of_record TN: -SF:contracts/swan/SwanManager.sol -FN:61,SwanManager. -FNDA:34,SwanManager. -DA:62,34 -FN:65,SwanManager.__SwanManager_init -FNDA:0,SwanManager.__SwanManager_init -DA:66,34 -FN:74,SwanManager.getMarketParameters -FNDA:141,SwanManager.getMarketParameters -DA:75,141 -FN:79,SwanManager.getOracleParameters +SF:src/SwanManager.sol +DA:60,41 +FN:60,SwanManager.constructor +FNDA:41,SwanManager.constructor +DA:61,41 +DA:69,4005 +FN:69,SwanManager.getMarketParameters +FNDA:4005,SwanManager.getMarketParameters +DA:70,4005 +DA:74,6 +FN:74,SwanManager.getOracleParameters FNDA:6,SwanManager.getOracleParameters -DA:80,6 -FN:86,SwanManager.setMarketParameters -FNDA:3,SwanManager.setMarketParameters -DA:87,3 -BRDA:87,0,0,- -BRDA:87,0,1,3 -DA:88,3 -DA:89,3 -FN:95,SwanManager.setOracleParameters -FNDA:1,SwanManager.setOracleParameters +DA:75,6 +DA:81,8428 +FN:81,SwanManager.setMarketParameters +FNDA:8428,SwanManager.setMarketParameters +DA:82,513 +BRDA:82,0,0,- +BRDA:82,0,1,513 +DA:83,513 +DA:84,513 +DA:90,7959 +FN:90,SwanManager.setOracleParameters +FNDA:7959,SwanManager.setOracleParameters +DA:91,1 DA:96,1 -FN:101,SwanManager.getOracleFee +FN:96,SwanManager.getOracleFee FNDA:1,SwanManager.getOracleFee -DA:102,1 -DA:103,1 -FN:110,SwanManager.setFactories -FNDA:1,SwanManager.setFactories -DA:111,1 -DA:112,1 -FN:123,SwanManager.addOperator -FNDA:0,SwanManager.addOperator -DA:124,0 -FN:131,SwanManager.removeOperator -FNDA:0,SwanManager.removeOperator -DA:132,0 -FN:137,SwanManager.getCurrentMarketParameters -FNDA:8,SwanManager.getCurrentMarketParameters -DA:138,120 -FNF:11 -FNH:8 -LF:15 -LH:13 +DA:97,1 +DA:98,1 +DA:109,7776 +FN:109,SwanManager.addOperator +FNDA:7776,SwanManager.addOperator +DA:110,0 +DA:117,7856 +FN:117,SwanManager.removeOperator +FNDA:7856,SwanManager.removeOperator +DA:118,0 +DA:123,3393 +FN:123,SwanManager.getCurrentMarketParameters +FNDA:3393,SwanManager.getCurrentMarketParameters +DA:124,4301 +FNF:9 +FNH:9 +LF:21 +LH:19 BRF:2 BRH:1 end_of_record -TN: -SF:script/Deploy.s.sol -FN:31,Deploy.run -FNDA:1,Deploy.run -DA:32,1 -DA:33,1 -DA:35,1 -DA:36,1 -DA:37,1 -DA:38,1 -DA:39,1 -DA:41,1 -FN:44,Deploy.deployLLM -FNDA:1,Deploy.deployLLM -DA:46,1 -DA:49,1 -DA:52,1 -DA:58,1 -DA:59,1 -DA:62,1 -DA:70,1 -DA:71,1 -FN:74,Deploy.deployFactories -FNDA:1,Deploy.deployFactories -DA:75,1 -DA:76,1 -FN:79,Deploy.deploySwan -FNDA:1,Deploy.deploySwan -DA:81,1 -DA:88,1 -DA:91,1 -DA:94,1 -DA:116,1 -DA:117,1 -FN:120,Deploy.writeContractAddresses -FNDA:1,Deploy.writeContractAddresses -DA:122,1 -DA:123,1 -DA:125,1 -DA:144,1 -FNF:5 -FNH:5 -LF:28 -LH:28 -BRF:0 -BRH:0 -end_of_record -TN: -SF:script/HelperConfig.s.sol -FN:31,HelperConfig. -FNDA:1,HelperConfig. -DA:33,1 -DA:34,1 -DA:35,1 -DA:37,1 -DA:48,1 -BRDA:48,0,0,- -DA:50,0 -DA:53,1 -FNF:1 -FNH:1 -LF:7 -LH:6 -BRF:1 -BRH:0 -end_of_record diff --git a/lib/forge-std b/lib/forge-std index 1eea5ba..83c5d21 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 1eea5bae12ae557d589f9f0f0edae2faa47cb262 +Subproject commit 83c5d212a01f8950727da4095cdfe2654baccb5b diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts index 69c8def..6e05b68 160000 --- a/lib/openzeppelin-contracts +++ b/lib/openzeppelin-contracts @@ -1 +1 @@ -Subproject commit 69c8def5f222ff96f2b5beff05dfba996368aa79 +Subproject commit 6e05b68bd96ab90a4049adb89f20fd578404b274 diff --git a/lib/openzeppelin-contracts-upgradeable b/lib/openzeppelin-contracts-upgradeable index fa52531..e26285b 160000 --- a/lib/openzeppelin-contracts-upgradeable +++ b/lib/openzeppelin-contracts-upgradeable @@ -1 +1 @@ -Subproject commit fa525310e45f91eb20a6d3baa2644be8e0adba31 +Subproject commit e26285b811cfab8a779994549b94219fc96a6013 diff --git a/lib/openzeppelin-foundry-upgrades b/lib/openzeppelin-foundry-upgrades index 16e0ae2..8e754fd 160000 --- a/lib/openzeppelin-foundry-upgrades +++ b/lib/openzeppelin-foundry-upgrades @@ -1 +1 @@ -Subproject commit 16e0ae21e0e39049f619f2396fa28c57fad07368 +Subproject commit 8e754fde23b2b030a35bb47cd84b77dd42a44437 diff --git a/script/HelperConfig.s.sol b/script/HelperConfig.s.sol index 1c76829..9dae963 100644 --- a/script/HelperConfig.s.sol +++ b/script/HelperConfig.s.sol @@ -51,7 +51,7 @@ contract HelperConfig is Script { minScore = 1; // for base sepolia - if (block.chainid == 84532) { + if (block.chainid == 84532 || block.chainid == 8453) { // use deployed weth token = WETH9(payable(0x4200000000000000000000000000000000000006)); } diff --git a/storage.sh b/storage.sh index cb99842..cfe6a75 100644 --- a/storage.sh +++ b/storage.sh @@ -1,9 +1,9 @@ #!/bin/bash OUTPUT_PATH=${1:-storage} -EXCLUDE="test|mock|libraries|" +EXCLUDE="test|mock|script" IFS=$'\n' -CONTRACT_FILES=($(find ./contracts -type f)) +CONTRACT_FILES=($(find ./src -type f)) unset IFS echo "Generating layouts in $OUTPUT_PATH"