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

feat: activate EUR base transmuter #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts
38 changes: 2 additions & 36 deletions scripts/foundry/transmuter/TransmuterCrosschainActivation.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ contract TransmuterCrosschainActivation is Utils {
uint256 chainId = vm.envUint("CHAIN_ID");

// TODO
StablecoinType fiat = StablecoinType.USD;
uint256 newCap = 2_000_000 ether;
userProtection = uint128(5 * BPS);
StablecoinType fiat = StablecoinType.EUR;
// TODO END

transmuter = _getTransmuter(chainId, fiat);
Expand All @@ -45,46 +43,14 @@ contract TransmuterCrosschainActivation is Utils {
address to;
uint256 value = 0;

if (chainId != CHAIN_ARBITRUM) {
{
to = address(treasury);
bytes memory data = abi.encodeWithSelector(IAddMinter.addMinter.selector, address(transmuter));
uint256 dataLength = data.length;
bytes memory internalTx = abi.encodePacked(isDelegateCall, to, value, dataLength, data);
transactions = abi.encodePacked(transactions, internalTx);
}

{
to = address(transmuter);
bytes memory data = abi.encodeWithSelector(
ISetStablecoin.setStablecoinCap.selector,
collateralList[0],
newCap
);
uint256 dataLength = data.length;
bytes memory internalTx = abi.encodePacked(isDelegateCall, to, value, dataLength, data);
transactions = abi.encodePacked(transactions, internalTx);
}

{
(
Storage.OracleReadType oracleType,
Storage.OracleReadType targetType,
bytes memory oracleData,
bytes memory targetData,

) = transmuter.getOracle(collateralList[0]);

to = address(transmuter);
bytes memory data = abi.encodeWithSelector(
ISettersGovernor.setOracle.selector,
collateralList[0],
abi.encode(oracleType, targetType, oracleData, targetData, abi.encode(userProtection, uint128(0)))
);
uint256 dataLength = data.length;
bytes memory internalTx = abi.encodePacked(isDelegateCall, to, value, dataLength, data);
transactions = abi.encodePacked(transactions, internalTx);
}

// // TODO only on BASE
// // No minter role
// if (chainId == CHAIN_BASE) {
Expand Down