-
Notifications
You must be signed in to change notification settings - Fork 139
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
Full deployments for testnet #273
base: master
Are you sure you want to change the base?
Conversation
Wearable-patch
Aavegotchi memory _aavegotchi = s.aavegotchis[_tokenId]; | ||
bytes memory _metadata = abi.encode(_aavegotchi); | ||
INFTBridge(s.gotchGeistBridge).bridge(_receiver, msg.sender, _tokenId, 1, _msgGasLimit, _connector, _metadata, new bytes(0)); | ||
if (_hasVault) { // this module should work when has vault |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the Vault? And what happens if there is no Vault? @orionstardust
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use if block.chainid == 137 { has vault}
if (_hasVault) { // this module should work when has vault | ||
for (uint slot; slot < _aavegotchi.equippedWearables.length; slot++) { | ||
uint wearableId = _aavegotchi.equippedWearables[slot]; | ||
if (wearableId != 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to check for borrowed wearables too
for (uint slot; slot < _aavegotchi.equippedWearables.length; slot++) { | ||
if (_aavegotchi.equippedWearables[slot] != 0) { | ||
uint wearableId = _aavegotchi.equippedWearables[slot]; | ||
if (isMint) { // if bridge is controller, mint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we replace this with chainids?
if (_aavegotchi.equippedWearables[slot] != 0) { | ||
uint wearableId = _aavegotchi.equippedWearables[slot]; | ||
if (isMint) { // if bridge is controller, mint | ||
s.itemTypes[wearableId].totalQuantity += 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we decrease this when burning the token?
delete s.aavegotchis[_tokenId].equippedWearables[slot]; | ||
LibItems.removeFromParent(address(this), _tokenId, wearableId, 1); | ||
LibItems.addToOwner(address(0), wearableId, 1); | ||
s.itemTypes[wearableId].totalQuantity -= 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay i see we are lowering the quantity, good
// delete aavegotchi info | ||
string memory name = _aavegotchi.name; | ||
if (bytes(name).length > 0) { | ||
delete s.aavegotchiNamesUsed[LibAavegotchi.validateAndLowerName(name)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can people rename gotchis on Geist side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- disable renaming on polygon
- migrate all names on Geist
- enable renaming on Geist
- ensure names are handled in the metadata transfer
@@ -159,7 +159,7 @@ library LibAavegotchi { | |||
aavegotchiInfo_.equippedWearables = s.aavegotchis[_tokenId].equippedWearables; | |||
aavegotchiInfo_.collateral = s.aavegotchis[_tokenId].collateralType; | |||
aavegotchiInfo_.escrow = s.aavegotchis[_tokenId].escrow; | |||
aavegotchiInfo_.stakedAmount = IERC20(aavegotchiInfo_.collateral).balanceOf(aavegotchiInfo_.escrow); | |||
// aavegotchiInfo_.stakedAmount = IERC20(aavegotchiInfo_.collateral).balanceOf(aavegotchiInfo_.escrow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will tell users to pull out their collateral
two choices:
- pull out all collateral
- allow users to stake erc20 GHST instead
so when a gotchi bridges, we should require(stakedAmount < 0.001)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe could just unstake it for them during bridging
address _ownershipFacet | ||
address _ownershipFacet, | ||
address _aavegotchiDiamond, | ||
address wearableDiamond |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this change on Polygon because this code isn't being redeployed.
@@ -46,24 +46,24 @@ contract ForgeFacet is Modifiers { | |||
} | |||
|
|||
// External contracts | |||
function aavegotchiGameFacet() internal pure returns (AavegotchiGameFacet facet) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this change on Polygon because this code isn't being redeployed.
@@ -116,7 +114,7 @@ contract ForgeVRFFacet is Modifiers { | |||
s.vrfUserToRequestIds[sender].push(requestId); | |||
|
|||
// for testing | |||
// tempFulfillRandomness(requestId, uint256(keccak256(abi.encodePacked(block.number, _geodeTokenIds[0])))); | |||
// tempFulfillRandomness(requestId, uint256(keccak256(abi.encodePacked(block.number, _geodeTokenIds[0])))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this change on Polygon because this code isn't being redeployed.
} | ||
|
||
bytes32 public constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage"); | ||
address public constant AAVEGOTCHI_DIAMOND = 0x86935F11C86623deC8a25696E1C19a8659CbF95d; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this change on Polygon because this code isn't being redeployed.
address vrfCoordinator; | ||
address linkAddress; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this change on Polygon because this code isn't being redeployed.
address public constant AAVEGOTCHI_DIAMOND = 0x86935F11C86623deC8a25696E1C19a8659CbF95d; | ||
address public constant WEARABLE_DIAMOND = 0x58de9AaBCaeEC0f69883C94318810ad79Cc6a44f; | ||
// address public constant AAVEGOTCHI_DIAMOND = 0x86935F11C86623deC8a25696E1C19a8659CbF95d; | ||
// address public constant WEARABLE_DIAMOND = 0x58de9AaBCaeEC0f69883C94318810ad79Cc6a44f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this change on Polygon because this code isn't being redeployed.
No description provided.