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.
What is the Vault? And what happens if there is no Vault? @orionstardust
There was a problem hiding this comment.
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.
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.
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.
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.
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.
can people rename gotchis on Geist side?
There was a problem hiding this comment.
- disable renaming on polygon
- migrate all names on Geist
- enable renaming on Geist
- ensure names are handled in the metadata transfer
| 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.
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.
maybe could just unstake it for them during bridging
| address _ownershipFacet | ||
| address _ownershipFacet, | ||
| address _aavegotchiDiamond, | ||
| address wearableDiamond |
There was a problem hiding this comment.
We don't need this change on Polygon because this code isn't being redeployed.
| } | ||
|
|
||
| // External contracts | ||
| function aavegotchiGameFacet() internal pure returns (AavegotchiGameFacet facet) { |
There was a problem hiding this comment.
We don't need this change on Polygon because this code isn't being redeployed.
|
|
||
| // 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.
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.
We don't need this change on Polygon because this code isn't being redeployed.
| uint256 chainlinkFee; | ||
| uint64 subscriptionId; | ||
| address vrfCoordinator; | ||
| address linkAddress; |
There was a problem hiding this comment.
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.
We don't need this change on Polygon because this code isn't being redeployed.
No description provided.