add more condition for evolve hero and equipmeng

This commit is contained in:
zhl 2022-01-17 16:44:09 +08:00
parent 6c2aa8c097
commit ba1734543b
11 changed files with 99 additions and 99 deletions

View File

@ -20376,12 +20376,12 @@
}
},
"links": {},
"address": "0xbC06F0372EDC96D6247b5cb5e6f48dbff6561DCC",
"transactionHash": "0x569a553f512f60293f9a9cacc777ef40ee504355aa4daaaa0b829d33de229e45"
"address": "0xfc74976db6972E0D338C7495fB4a1C49A748D375",
"transactionHash": "0x0a32ac918a3e7401ac37f1741f76fab739190fc19e079d621ee1371771a02775"
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-17T08:13:12.846Z",
"updatedAt": "2022-01-17T08:25:53.101Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -23898,12 +23898,12 @@
}
},
"links": {},
"address": "0x1f37Cd04AaA278CEFB2AC323f9Ad1c422f677710",
"transactionHash": "0x9fb591b6dc57ce13eec698b188611cadd5ff1002c7c5ba8a9d365fe1a76448bf"
"address": "0x4BF5304F85cE3D291b5d444F945e73CCe05a7735",
"transactionHash": "0x3a8a1d75467022e9eae6e2511495f28541dca0ece79298db84c9c946e7473136"
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-17T08:13:12.803Z",
"updatedAt": "2022-01-17T08:25:53.051Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -18080,12 +18080,12 @@
}
},
"links": {},
"address": "0x1513eD540DA47138690CC45F0bb9d8CFF35ACCB5",
"transactionHash": "0x69ac2365e680d6ebcb31b92e31075ff0282c8da2fc29e31a7319c5cb743d64a5"
"address": "0x74cEf89Add624B17015d685B2b348Bb342D47De6",
"transactionHash": "0x75cc240d26a0b1514add3be75cd45a780024761c1bbde67d5a27929d023c42d1"
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-17T08:13:12.836Z",
"updatedAt": "2022-01-17T08:25:53.090Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -23898,12 +23898,12 @@
}
},
"links": {},
"address": "0xd662ee394187BE8629A8BED1eDFB6b6e74521b63",
"transactionHash": "0x7aaf7c1a01339e6a872a85ad50b4df9062fff266049f40f75da3d4ec15e7c534"
"address": "0x96D2D8C439d0a48C6bDB38bb017E989572C68Cc9",
"transactionHash": "0x17a91183a73eb0af7247e5c9bb418304da1440aa73a12ae2080bf70d159004bf"
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-17T08:13:12.792Z",
"updatedAt": "2022-01-17T08:25:53.036Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -23904,12 +23904,12 @@
}
},
"links": {},
"address": "0x67BdACa0850F47653a390F9F9ea5470aD3C0f8Bc",
"transactionHash": "0xeac27f026d79edc48458173f2e07362caf5bac71c277a4d7b0017558ab3bdaf6"
"address": "0x0C4EF120a11D2F5BC19e1C38238A366dacBb77Ff",
"transactionHash": "0x69aa3671746f802a46bfc1266eb41b3a34afba137d8b1fa6e4698adba05a60d2"
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-17T08:13:12.780Z",
"updatedAt": "2022-01-17T08:25:53.020Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -30651,12 +30651,12 @@
}
},
"links": {},
"address": "0x4575530ba93ABfBE9e530d5F327cBD04FAd6D48F",
"transactionHash": "0x9a9d534ffa811b27396d17457063f4bb691e332eb975d62e54d23b9cb7734566"
"address": "0x1E26af061552c1C6cEcfC839008B2d401B48a468",
"transactionHash": "0x018fff4ffb83bdda5db0680f4452a3994a1971c6e16508ea0f875660e9dd4eaa"
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-17T08:13:12.823Z",
"updatedAt": "2022-01-17T08:25:53.074Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -2323,12 +2323,12 @@
"1338": {
"events": {},
"links": {},
"address": "0x1Ba676cFA8eED89Ec013E61cf0178b9903212da8",
"transactionHash": "0x87ca3eb6f2a72d61307d5cecfa17e748da8055f3ea49bd1e42b0ecff1f850907"
"address": "0xcadA70800d02Ae48f7ddD594746F9E58C956EA97",
"transactionHash": "0xc39f4b68cb850d4e927693949d8f4ae30707dc097db24cceb118cbd7b9ea7864"
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-17T08:13:12.859Z",
"updatedAt": "2022-01-17T08:25:53.114Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -8953,12 +8953,12 @@
}
},
"links": {},
"address": "0x9F7031362C07e59763Bbe1A48F299A1A3A8cF4E1",
"transactionHash": "0xc89e872c11878f7b47dce24efca9715c4e38c10ce7a8ef6da1cc9fe354fdf5d6"
"address": "0x7b17f7DC44c5e84F0197Bb0af57Bb7dE90d6a4B7",
"transactionHash": "0xde74d0537fdee837f7b744923def447f66e54f12527798e07b21f3e4330a60c1"
}
},
"schemaVersion": "3.4.4",
"updatedAt": "2022-01-17T08:13:12.812Z",
"updatedAt": "2022-01-17T08:25:53.062Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -34,7 +34,7 @@ contract EvolveProxy is Ownable, Initializable {
* tokenIds: [hero_to_evolve, hero_for_burn, chip]
*/
function evolveHero(address to, uint256[3] calldata tokenIds) external {
require(publicEvolveAllowed || _msgSender() == owner());
require((publicEvolveAllowed && _msgSender() == to) || _msgSender() == owner());
require(hero.ownerOf(tokenIds[0]) == to, "current address is not owner of this hero now");
hero.burn(to, tokenIds[1]);
if (tokenIds[2] > 0) {
@ -48,7 +48,7 @@ contract EvolveProxy is Ownable, Initializable {
* tokenIds: [equip_to_evolve, equip_for_burn, chip]
*/
function evolveEquip(address to, uint256[3] calldata tokenIds) external{
require(publicEvolveAllowed || _msgSender() == owner());
require((publicEvolveAllowed && _msgSender() == to) || _msgSender() == owner());
require(equip.ownerOf(tokenIds[0]) == to, "current address is not owner of this equipment now");
equip.burn(to, tokenIds[1]);
if (tokenIds[2] > 0) {