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

chore(rinkeby): update subscribe event to include collateral token #47

Merged
merged 1 commit into from
Nov 12, 2021
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
3 changes: 3 additions & 0 deletions contracts/interfaces/IMeTokenRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ interface IMeTokenRegistry {
event Subscribe(
address indexed _meToken,
address indexed _owner,
uint256 _minted,
address _collateralToken,
uint256 _collateralDeposited,
string _name,
string _symbol,
uint256 _hubId
Expand Down
14 changes: 12 additions & 2 deletions contracts/registries/MeTokenRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ contract MeTokenRegistry is Ownable, IMeTokenRegistry {
address meTokenAddr = meTokenFactory.create(_name, _symbol);

// Mint meToken to user
uint256 _meTokensMinted;
if (_assetsDeposited > 0) {
uint256 _meTokensMinted = ICurve(hub_.curve).calculateMintReturn(
_meTokensMinted = ICurve(hub_.curve).calculateMintReturn(
_assetsDeposited, // _deposit_amount
_hubId, // _hubId
0, // _supply
Expand All @@ -92,7 +93,16 @@ contract MeTokenRegistry is Ownable, IMeTokenRegistry {
meToken_.hubId = _hubId;
meToken_.balancePooled = _assetsDeposited;

emit Subscribe(meTokenAddr, msg.sender, _name, _symbol, _hubId);
emit Subscribe(
meTokenAddr,
msg.sender,
_meTokensMinted,
hub_.asset,
_assetsDeposited,
_name,
_symbol,
_hubId
);
}

/// @inheritdoc IMeTokenRegistry
Expand Down
24 changes: 12 additions & 12 deletions deployment/script-rinkeby.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"network": "rinkeby",
"Hub Contract Address": "0x709A55fa9F1C23Bb8D3c8db390cc82Eb7c10E526",
"VaultRegistry Contract Address": "0xd43801bEeaBae6FAb6eca9De8334Eac0ea992396",
"Migration Registry Contract Address": "0xabd68C360735cBF3C20937539E15bA6565FFA045",
"SingleAsset Vault Contract Address": "0x14DEF3F8a64B4e4bD5C08cC74ab6a4eD1B443479",
"Fee Contract Address": "0x1Fd9bd4354b0bC276Cdb963Fa7FC67e67851d13f",
"Curve Registry Contract Address": "0xfc3872474D1Ab36a914a4E6d411065FE2ef9225F",
"Bancor Curve Contract Address": "0x70e9Da5FF5C0684Be29aAaaBC1549cDE042f8a8D",
"Foundry Contract Address": "0x2B12c10407421cE8eB7520cbe3e17Ac68a60b8DF",
"MeToken Factory Contract Address": "0xf019aC5E337489a0aF0c909e5B73BAF1342ad7DB",
"MeToken Registry Contract Address": "0x9F1a8e2F32705f0F584552F8545d8fF0CDD82BF1",
"WeightedAverage Contract Address": "0x52A9054858A4E95b6d58078A6627b28a4Ca3Ff79",
"Block Number": "9621499"
"Hub Contract Address": "0x914bd0af1e158E55d159d78Ad19D624E25696De4",
"VaultRegistry Contract Address": "0x5065Cb3bC3B1881e70b11B2724d5399C077616bd",
"Migration Registry Contract Address": "0xfCd47dCCEc344f6F0c785Be919e3507408D044d6",
"SingleAsset Vault Contract Address": "0x05c4C8698cf351129585ebc376Fa1E10B3F6bdA1",
"Fee Contract Address": "0x29D8F397777B9d84c3dd5c2bcea8398A669d20e5",
"Curve Registry Contract Address": "0xcD86Ebc45c8f02B06C213e057ABc56BECe243Ee7",
"Bancor Curve Contract Address": "0xaC533dd9CfA342391C3f70f4B8521104f7Ca5E0a",
"Foundry Contract Address": "0x08216B04f79b6476F189179432A9EA9932824A01",
"MeToken Factory Contract Address": "0x149727Ff69d94fc8CF170806612D67101e77f27E",
"MeToken Registry Contract Address": "0x8B52A0D675FE76545B86526877D04E0c28fa3156",
"WeightedAverage Contract Address": "0x5Cb52183BB317992728f8AF25078B5EA9AF86316",
"Block Number": "9625170"
}