Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phecda-release-v2.96.0-alpha #2161

Merged
merged 61 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9d62ef5
SCCP-293 (#2076)
kaleb-keny May 2, 2023
e689f6c
SIP-298 - Add new markets (#2075)
leomassazza May 3, 2023
37ad69e
Merge branch 'master' into develop
barrasso May 4, 2023
bf9d09d
Set SIP-298 markets as resumed (already on-chain) (#2080)
leomassazza May 4, 2023
1f8ef97
SIP-2014: New PerpsV2 Markets (#2082)
leomassazza May 18, 2023
8c273d8
Add SIP-2015 markets (#2084)
leomassazza May 22, 2023
e1e099b
Merge branch 'master' into develop
barrasso May 24, 2023
b6a8ecf
Update Perp Parameters & set Paused to False (#2087)
kaleb-keny May 25, 2023
38784cf
Update perpsv2-markets.json - optimism-goerli (#2083)
kaleb-keny May 25, 2023
7376fb7
fix(chainMapping): fix typos in chain mappings (#1959)
roninjin10 May 25, 2023
fa90d8c
Bump webpack from 5.75.0 to 5.76.0 (#2050)
dependabot[bot] May 25, 2023
36f7363
Fix CI Test failing due to fork limitation (#2090)
leomassazza May 25, 2023
8f646f3
Update Perps V2 Market Settings - Skew Scale (#2088)
kaleb-keny May 26, 2023
5e9096a
Update perpsv2-markets.json (#2091)
kaleb-keny May 30, 2023
e8c8fc0
Update SCCP-293/2005 (#2092)
kaleb-keny Jun 1, 2023
97222dd
implements sccp-2009 (#2094)
kaleb-keny Jun 7, 2023
009d4ee
Implement SIP-2021 (stETH) (#2095)
leomassazza Jun 13, 2023
547fae3
Add missing markets to goerli (#2096)
leomassazza Jun 13, 2023
cbd8666
Merge branch 'master' into develop
barrasso Jun 14, 2023
5ecd577
SCCP-2012-2014-2015 (#2101)
kaleb-keny Jun 19, 2023
d596b1a
Configure sSTETHPERP on Goerli-ovm (#2104)
leomassazza Jun 29, 2023
3e1bf80
Update perps v2 config (#2109)
kaleb-keny Jul 12, 2023
f156adb
update as per sccp (#2112)
kaleb-keny Jul 17, 2023
3af8d18
update as per 2024 (#2113)
kaleb-keny Jul 17, 2023
49987fa
update json (#2114)
kaleb-keny Jul 19, 2023
5820022
update sccp-2026-2027 (#2117)
kaleb-keny Jul 25, 2023
cad1d57
update address (#2111)
leomassazza Jul 26, 2023
9c69b33
Add new markets (SIP-2009/23/24/25/26/27) (#2110)
leomassazza Jul 26, 2023
56787cf
update eth/btc and etc feeds (#2120)
kaleb-keny Jul 27, 2023
169c86e
Merge branch 'master' into develop
barrasso Jul 28, 2023
e63454f
SCCP 2029 & 2030 (#2124)
kaleb-keny Aug 1, 2023
5b104d9
sccp-2031 (#2125)
kaleb-keny Aug 1, 2023
6db61c1
SIP-2028 (#2123)
kaleb-keny Aug 1, 2023
d3ad339
Merge branch 'master' into develop
leomassazza Aug 2, 2023
f5ac19b
sccp-2032-2033 (#2128)
kaleb-keny Aug 3, 2023
aa2b82b
update perps v2 json (#2130)
kaleb-keny Aug 8, 2023
05bb350
SIP-2030 (#2129)
kaleb-keny Aug 9, 2023
d0070a7
Merge branch 'master' into develop
leomassazza Aug 9, 2023
7cc12d0
Update Optimism Goerli Chainlink Feeds / Executes SCCP-2036 (#2134)
kaleb-keny Aug 16, 2023
20dc821
npm audit fix (#2138)
leomassazza Aug 17, 2023
e8160a0
update json (#2136)
kaleb-keny Aug 17, 2023
7fbb45a
update json (#2140)
kaleb-keny Aug 28, 2023
07f2d46
update perps v2 json (#2142)
kaleb-keny Sep 1, 2023
b299fa1
SIP-2029, SIP-2031, SIP-2032, SIP-2033 markets (#2137)
leomassazza Sep 5, 2023
aefaae7
update as per sccp-2040 (#2147)
kaleb-keny Sep 6, 2023
1763e81
Merge branch 'master' into develop
leomassazza Sep 8, 2023
9959648
unpause new markets (#2149)
kaleb-keny Sep 11, 2023
f3853af
update json - sccp-2041-2042 (#2150)
kaleb-keny Sep 14, 2023
cac454d
Update steth eth goerli feed (#2151)
kaleb-keny Sep 14, 2023
67ceec5
update as per sccp-2044 (#2152)
kaleb-keny Sep 19, 2023
80ae2cc
sccp-2045 (#2153)
kaleb-keny Sep 22, 2023
0df10c1
implement 2046 (#2154)
kaleb-keny Sep 25, 2023
73dc32c
sccp-2048 (#2155)
kaleb-keny Sep 30, 2023
ab3ccfb
update skew scale as per sccp-2049 (#2156)
kaleb-keny Oct 9, 2023
4281196
Fix CI - Use a new foundry cache (#2157)
leomassazza Oct 10, 2023
5860850
sccp-2050 (#2158)
kaleb-keny Oct 11, 2023
3040126
implements sccp-2052 (#2159)
kaleb-keny Oct 13, 2023
263e573
SIP-2036 fix reward distributor to bubble failures (#2160)
dbeal-eth Oct 20, 2023
7f1c23c
Goerli deployment artifacts
leomassazza Oct 20, 2023
6e9c881
Goerli deployment artifacts
leomassazza Oct 20, 2023
546bb06
Merge remote-tracking branch 'origin/staging' into phecda-release-v2.…
leomassazza Oct 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 40 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DO NOT EDIT MANUALLY! instead run `npm run build:ci`
# autogenerated by `.circleci/pack.js` from contents of `jobs` .yml files
version: 2.1
orbs:
orbs:
rust: circleci/[email protected]
commands:
cmd-wait-for-port:
Expand Down Expand Up @@ -35,21 +35,30 @@ jobs:
image: ubuntu-2204:2022.04.1
docker_layer_caching: true
environment:
foundry_locked_commit: "232f66f9"
foundry_cache_version: "1"
steps:
- restore_cache:
keys:
- foundry-bin-${foundry_locked_commit}-12
- foundry-bin-latest-${foundry_cache_version}
- rust/install: {}
- run: |
if [ ! -d ~/.foundry ]; then
curl -O https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup && chmod +x ./foundryup
./foundryup -C $foundry_locked_commit
fi
rm -rf *
echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV
- run:
name: "Install Foundry"
working_directory: ~/
environment:
SHELL: /bin/bash
command: |-
export PATH="$PATH:$HOME/.foundry/bin"
echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV
if command -v anvil; then
echo "Anvil already installed"
anvil --version
else
curl -L https://foundry.paradigm.xyz | bash
foundryup
fi
rm -rf *
- save_cache:
key: foundry-bin-${foundry_locked_commit}-12
key: foundry-bin-latest-${foundry_cache_version}
paths:
- ~/.foundry/bin
- checkout
Expand Down Expand Up @@ -125,22 +134,31 @@ jobs:
image: ubuntu-2204:2022.04.1
docker_layer_caching: true
environment:
foundry_locked_commit: "232f66f9"
foundry_cache_version: "1"
resource_class: large
steps:
- restore_cache:
keys:
- foundry-bin-${foundry_locked_commit}-12
- foundry-bin-latest-${foundry_cache_version}
- rust/install: {}
- run: |
if [ ! -d ~/.foundry ]; then
curl -O https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup && chmod +x ./foundryup
./foundryup -C $foundry_locked_commit
fi
rm -rf *
echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV
- run:
name: "Install Foundry"
working_directory: ~/
environment:
SHELL: /bin/bash
command: |-
export PATH="$PATH:$HOME/.foundry/bin"
echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV
if command -v anvil; then
echo "Anvil already installed"
anvil --version
else
curl -L https://foundry.paradigm.xyz | bash
foundryup
fi
rm -rf *
- save_cache:
key: foundry-bin-${foundry_locked_commit}-12
key: foundry-bin-latest-${foundry_cache_version}
paths:
- ~/.foundry/bin
- checkout
Expand Down Expand Up @@ -288,7 +306,7 @@ jobs:
image: ubuntu-2204:2022.04.1
docker_layer_caching: true
environment:
foundry_locked_commit: "232f66f9"
foundry_cache_version: "1"
resource_class: large
steps:
- restore_cache:
Expand Down
28 changes: 19 additions & 9 deletions .circleci/src/jobs/job-cannon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@ steps:
# get foundry
- restore_cache:
keys:
- foundry-bin-${foundry_locked_commit}-12
- foundry-bin-latest-${foundry_cache_version}
- rust/install: {}
- run: |
if [ ! -d ~/.foundry ]; then
curl -O https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup && chmod +x ./foundryup
./foundryup -C $foundry_locked_commit
fi
rm -rf *
echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV
- run:
name: "Install Foundry"
working_directory: ~/
environment:
SHELL: /bin/bash
command: |-
export PATH="$PATH:$HOME/.foundry/bin"
echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV

if command -v anvil; then
echo "Anvil already installed"
anvil --version
else
curl -L https://foundry.paradigm.xyz | bash
foundryup
fi
rm -rf *

- save_cache:
key: foundry-bin-${foundry_locked_commit}-12
key: foundry-bin-latest-${foundry_cache_version}
paths:
- ~/.foundry/bin

Expand Down
28 changes: 19 additions & 9 deletions .circleci/src/jobs/job-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@ steps:
# get foundry
- restore_cache:
keys:
- foundry-bin-${foundry_locked_commit}-12
- foundry-bin-latest-${foundry_cache_version}
- rust/install: {}
- run: |
if [ ! -d ~/.foundry ]; then
curl -O https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup && chmod +x ./foundryup
./foundryup -C $foundry_locked_commit
fi
rm -rf *
echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV
- run:
name: "Install Foundry"
working_directory: ~/
environment:
SHELL: /bin/bash
command: |-
export PATH="$PATH:$HOME/.foundry/bin"
echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV

if command -v anvil; then
echo "Anvil already installed"
anvil --version
else
curl -L https://foundry.paradigm.xyz | bash
foundryup
fi
rm -rf *

- save_cache:
key: foundry-bin-${foundry_locked_commit}-12
key: foundry-bin-latest-${foundry_cache_version}
paths:
- ~/.foundry/bin

Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/snippets/job-header-machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ machine:
image: ubuntu-2204:2022.04.1
docker_layer_caching: true
environment:
foundry_locked_commit: "232f66f9"
foundry_cache_version: "1"
10 changes: 7 additions & 3 deletions contracts/RewardsDistribution.sol
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ contract RewardsDistribution is Owned, IRewardsDistribution {

// Iterate the array of distributions sending the configured amounts
for (uint i = 0; i < distributions.length; i++) {
if (distributions[i].destination != address(0) || distributions[i].amount != 0) {
if (distributions[i].destination != address(0) && distributions[i].amount != 0) {
remainder = remainder.sub(distributions[i].amount);

// Transfer the SNX
Expand All @@ -166,10 +166,14 @@ contract RewardsDistribution is Owned, IRewardsDistribution {
bytes memory payload = abi.encodeWithSignature("notifyRewardAmount(uint256)", distributions[i].amount);

// solhint-disable avoid-low-level-calls
(bool success, ) = distributions[i].destination.call(payload);
(bool success, bytes memory result) = distributions[i].destination.call(payload);

if (!success) {
// Note: we're ignoring the return value as it will fail for contracts that do not implement RewardsDistributionRecipient.sol
// if the error was emitted by the destination contract, bubble
uint len = result.length;
assembly {
revert(add(result, 0x20), len)
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion contracts/TradingRewards.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity ^0.5.16;
import "./Pausable.sol";
import "./MixinResolver.sol";
import "./Owned.sol";
import "./RewardsDistributionRecipient.sol";

// External dependencies.
import "openzeppelin-solidity-2.3.0/contracts/token/ERC20/SafeERC20.sol";
Expand All @@ -17,7 +18,7 @@ import "./interfaces/ITradingRewards.sol";
import "./interfaces/IExchanger.sol";

// https://docs.synthetix.io/contracts/source/contracts/tradingrewards
contract TradingRewards is ITradingRewards, ReentrancyGuard, Owned, Pausable, MixinResolver {
contract TradingRewards is ITradingRewards, ReentrancyGuard, Owned, Pausable, MixinResolver, RewardsDistributionRecipient {
using SafeMath for uint;
using SafeDecimalMath for uint;
using SafeERC20 for IERC20;
Expand Down Expand Up @@ -256,6 +257,8 @@ contract TradingRewards is ITradingRewards, ReentrancyGuard, Owned, Pausable, Mi
emit AssignedRewardTokensRecovered(recoverAddress, amount, periodID);
}

function notifyRewardAmount(uint256 reward) external {}

function _validateRecoverAddress(address recoverAddress) internal view {
if (recoverAddress == address(0) || recoverAddress == address(this)) {
revert("Invalid recover address");
Expand Down
3 changes: 1 addition & 2 deletions publish/deployed/goerli-ovm/feeds.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@
"feed": "0x6db19664922b194C59FE972f28CFCAD9667e5dDf"
},
"STETHETH": {
"fakeFeed": true,
"feed": "0x57241A37733983F97C4Ab06448F244A1E0Ca0ba8"
"feed": "0x93A0D1B1cdF50b6bC83bc89bb59fA3Aa7A93B3e3"
},
"MAV": {
"asset": "MAV",
Expand Down
Loading