Closed pmerkleplant closed 1 year ago
Note that CI is failing because Greenhouse
dependency is still private and can not be git clone
'd yet.
Note that CI is failing because
Greenhouse
dependency is still private and can not begit clone
'd yet.
tests + lint pass locally
🦄 make test
forge test -vvv
[â ’] Compiling...
[â ”] Compiling 5 files with 0.8.16
[â ‘] Solc 0.8.16 finished in 46.20s
Compiler run successful!
Running 5 tests for test/Runner.t.sol:LibCalcTest
[PASS] testFuzz_unsafeMean(uint128,uint128) (runs: 256, μ: 497, ~: 497)
[PASS] test_distance() (gas: 305)
[PASS] test_pctDiff() (gas: 439)
[PASS] test_scale_basic() (gas: 240)
[PASS] test_scale_revert() (gas: 3398)
Test result: ok. 5 passed; 0 failed; finished in 6.03ms
Running 29 tests for test/Runner.t.sol:AggorTest
[PASS] testFuzz_poke_FailsIf_ChainlinkValueNegative(uint128,int256) (runs: 256, μ: 133683, ~: 133901)
[PASS] testFuzz_poke_FailsIf_ChainlinkValueStale(uint128,uint256) (runs: 256, μ: 133080, ~: 133766)
[PASS] testFuzz_poke_FailsIf_ChainlinkValueZero(uint128) (runs: 256, μ: 109771, ~: 109771)
[PASS] testFuzz_poke_FailsIf_ChronicleValueStale(uint128,uint256) (runs: 256, μ: 132090, ~: 132698)
[PASS] testFuzz_poke_FailsIf_ChronicleValueZero(uint128) (runs: 256, μ: 106858, ~: 106858)
[PASS] testFuzz_poke_basic(uint128,uint128,uint256,uint256,uint256) (runs: 256, μ: 146607, ~: 146756)
[PASS] testFuzz_setSpread(uint16) (runs: 256, μ: 24053, ~: 24084)
[PASS] testFuzz_setSpread_FailsIf_BiggerThanPScale(uint16) (runs: 256, μ: 12088, ~: 12088)
[PASS] testFuzz_setStalenessThreshold(uint32) (runs: 256, μ: 24527, ~: 24527)
[PASS] testFuzz_setUniSecondsAgo(uint32) (runs: 256, μ: 43074, ~: 43183)
[PASS] testFuzz_setUniSecondsAgo_FailsIf_LessThanMinAllowedSeconds(uint32) (runs: 256, μ: 13104, ~: 13104)
[PASS] test_Deployment() (gas: 20366)
[PASS] test_latestAnswer_IsTollProtected() (gas: 11841)
[PASS] test_latestRoundData_IsTollProtected() (gas: 12839)
[PASS] test_poke_ChainlinkDecimalConversion() (gas: 156430)
[PASS] test_readWithAge_FailsIfValIsZero() (gas: 13424)
[PASS] test_readWithAge_IsTollProtected() (gas: 11614)
[PASS] test_read_FailsIfValIsZero() (gas: 12893)
[PASS] test_read_IsTollProtected() (gas: 12388)
[PASS] test_setSpread_IsAuthProtected() (gas: 12109)
[PASS] test_setStalenessThreshold_FailsIf_IsZero() (gas: 11320)
[PASS] test_setStalenessThreshold_IsAuthProtected() (gas: 11889)
[PASS] test_setUniSecondsAgo_IsAuthProtected() (gas: 12244)
[PASS] test_tryReadWithAge_IsTollProtected() (gas: 12777)
[PASS] test_tryReadWithAge_ReturnsFalseIfValIsZero() (gas: 11157)
[PASS] test_tryRead_IsTollProtected() (gas: 11952)
[PASS] test_tryRead_ReturnsFalseIfValIsZero() (gas: 10070)
[PASS] test_useUniswap_IsAuthProtected() (gas: 12326)
[PASS] test_useUniswap_NotConfigured() (gas: 2345678)
Test result: ok. 29 passed; 0 failed; finished in 82.46ms
Running 2 tests for test/MainnetIntegration.t.sol:MainnetIntegrationTest
[PASS] testIntegration_Mainnet() (gas: 215729)
Logs:
Uni source 1852564980
Uni scaled 1852564980000000000000
Chain source 185262000000
Chain scaled 1852620000000000000000
Chron source 1851470000000000000000
Spread 7
Spread/uni 6
Aggor(chain) 1852045000000000000000
Aggor(chain) 1852620000000000000000
Aggor(uni) 1852017490000000000000
Aggor(uni) 1852564980000000000000
[PASS] testIntegration_UniswapLookback() (gas: 118692)
Test result: ok. 2 passed; 0 failed; finished in 5.58s
forge fmt --check
🦄
chronicle-std
dependency to version 2 to fix deployment issuescript/AggorScript.md
file documenting how to deploy and configure Aggor instancesNote that the deployment script is so far not tested! This is because we don't have any Scrib deployed yet.
This PR is a draft PR and should be merged after Scribe is deployed and script is tested.