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

[ETHEREUM-CONTRACTS] more realistic fUSDC #2023

Merged
merged 3 commits into from
Sep 24, 2024
Merged
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
1 change: 1 addition & 0 deletions packages/ethereum-contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

* `IUserDefinedMacro`: added a method `postCheck()` which allows to verify state changes after running the macro.
* `SuperfluidFrameworkDeployer` now also deploys and `MacroForwarder` and enables it as trusted forwarder.
* `deploy-test-environment.js` now deploys fUSDC (the underlying) with 6 decimals (instead of 18) to better resemble the actual USDC.

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,32 @@ module.exports = eval(`(${S.toString()})()`)(async function (
let tokens;

if (args.length >= 1) {
tokens = args.pop().split(",");
const tokenSymbols = args.pop().split(",");
tokens = tokenSymbols.map((symbol) => ({ symbol, decimals: 18}));
} else {
tokens = ["fDAI", "fUSDC", "fTUSD", config.nativeTokenSymbol];
tokens = [
{ symbol: "fDAI", decimals: 18 },
{ symbol: "fUSDC", decimals: 6 },
{ symbol: "fTUSD", decimals: 18 },
{ symbol: "ETH", decimals: 18 }
];
}
console.log("Tokens to be deployed", tokens);
console.log("Super Tokens to be deployed", tokens.map((t) => t.symbol + "x"));

console.log("======== Deploying superfluid framework ========");
await deployFramework(errorHandler, options);
console.log("==== Superfluid framework deployed ========");

for (let i = 0; i < tokens.length; ++i) {
if (tokens[i] !== deploySuperToken) { // ???
if (tokens[i].symbol !== config.nativeTokenSymbol) {
console.log(`======== Deploying test token ${tokens[i]} ========`);
await deployTestToken(errorHandler, [":", tokens[i]], options);
console.log(`======== Test token ${tokens[i]} deployed ========`);
await deployTestToken(errorHandler, [":", tokens[i].decimals, tokens[i].symbol], options);
console.log(`======== Test token ${tokens[i].symbol} deployed ========`);
}

console.log(`======== Creating super token for ${tokens[i]} ========`);
await deploySuperToken(errorHandler, [":", tokens[i]], options);
console.log(`======== Super token for ${tokens[i]} deployed ========`);
console.log(`======== Creating super token for ${tokens[i].symbol} ========`);
await deploySuperToken(errorHandler, [":", tokens[i].symbol], options);
console.log(`======== Super token for ${tokens[i].symbol} deployed ========`);
}

if (process.env.RESOLVER_ADDRESS) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ethereum-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"hardhat": "2.22.9"
},
"devDependencies": {
"@d10r/truffle-plugin-verify": "^0.6.10",
"@d10r/truffle-plugin-verify": "^0.6.11",
"@nomiclabs/hardhat-truffle5": "^2.0.7",
"@safe-global/safe-core-sdk": "^3.3.5",
"@safe-global/safe-service-client": "^2.0.3",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1009,10 +1009,10 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"

"@d10r/truffle-plugin-verify@^0.6.10":
version "0.6.10"
resolved "https://registry.yarnpkg.com/@d10r/truffle-plugin-verify/-/truffle-plugin-verify-0.6.10.tgz#f37d0b50ea3ec3e9ce5e8beed4bdb6df59404fd6"
integrity sha512-aCqotcE3usTImVRM9DW9z1nyR6LA+0t5GSlgivTnHYonWpBChkz5rFHAoHwyKsZU9BeJbPwLYwpB9K2ldWojdg==
"@d10r/truffle-plugin-verify@^0.6.11":
version "0.6.11"
resolved "https://registry.yarnpkg.com/@d10r/truffle-plugin-verify/-/truffle-plugin-verify-0.6.11.tgz#d10d1923b1344f14b513c0d7ce831c5cfa1407ba"
integrity sha512-jWn2WpiA2fas05XqjJtTLXcOJ4XRL+etf2A/in86AtqN88tImYbcoPIg+S8TpDp/Qum+PGr9edDof/ui1Q/jCw==
dependencies:
"@truffle/resolver" "^9.0.35"
axios "^0.26.1"
Expand Down
Loading