update sth

This commit is contained in:
cebgcontract 2022-08-08 14:39:54 +08:00
parent fd852c9998
commit 8a700c4275
39 changed files with 158822 additions and 102654 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -24578,6 +24578,182 @@
"address": "0x290857C5bd3DeDea7a9Cb9a70cdA30F6C958Eb0d",
"transactionHash": "0xf1f1433ca7f822e51cfb15076405d097ddaf2c204ee65fc348b0fbbe280fb43c"
},
"5777": {
"events": {
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
"0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
"0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
"0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
},
"links": {},
"address": "0xf549ef2aAbbe580B1C37e248741FBAe30baFb6E0",
"transactionHash": "0x2e67c0963c0ae8dc12263474503dfdfe8f39566923376bea27e575e8b398ce3e"
},
"1644989050832": {
"events": {
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
@ -24755,8 +24931,8 @@
"transactionHash": "0x2cdd3edaefb4cc8d17e41f958c24473b94e4d3d00834fd21eadae0414476168d"
}
},
"schemaVersion": "3.4.3",
"updatedAt": "2022-04-25T07:18:22.748Z",
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-08T03:23:30.300Z",
"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

@ -9938,6 +9938,120 @@
"address": "0x03C050A64b97E69622CB0682ce12c46EFf19d3c5",
"transactionHash": "0x7268b79c7cd9b0ef53fcc7aa5fb375fa786e79f5c0e080991e41989454439336"
},
"5777": {
"events": {
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
},
"links": {},
"address": "0x1e751B6785cEE311D06b805c68D77e0a1c125108",
"transactionHash": "0x5dd9837bbfdfd1bde3d907d95ce314e32fbb0a4b679b53cea6102dca4bc6ecda"
},
"80001": {
"events": {
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
},
"links": {},
"address": "0xC43AA64C83eaAFD429E03506a413cB834046a7f2",
"transactionHash": "0x3eed01aa6f4970dc13a1af194a5d8923b9f168bf5e52783bea76334462975969"
},
"1644989050832": {
"events": {},
"links": {},
@ -9946,7 +10060,7 @@
}
},
"schemaVersion": "3.4.3",
"updatedAt": "2022-04-25T07:18:22.699Z",
"updatedAt": "2022-08-08T04:51:19.905Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -24578,6 +24578,182 @@
"address": "0x4EA03e48C6842D247307b493C14B0db81385D5FB",
"transactionHash": "0x2caa0691aca989eb3c6d7a0cf244cc7baf5f631fe3bf33a79bc62cd1f302c4ba"
},
"5777": {
"events": {
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
"0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
"0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
"0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
},
"links": {},
"address": "0xE56D52b3a19fca9Bf1852c5B9E85D5EaBd1542B8",
"transactionHash": "0xa72697f68c7eb4a1589e5bfbbf0b2d02c0b848877c16870b22d6ecabdeedb72c"
},
"1644989050832": {
"events": {
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
@ -24755,8 +24931,8 @@
"transactionHash": "0xb650d51b20a90c34ecd38dc27ff4434eb5849b5b73f924ea14c3ed061cca2fe9"
}
},
"schemaVersion": "3.4.3",
"updatedAt": "2022-04-25T07:18:22.733Z",
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-08T03:23:30.286Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

File diff suppressed because one or more lines are too long

View File

@ -24414,6 +24414,182 @@
"address": "0x2b1b5FC85d408344E04c49Ba9A66aC35Dbc50bAD",
"transactionHash": "0xd9df8fd373bb01dc7e9dfaa7cad04a144fd29dd559d333ce6eb37037f25fc047"
},
"5777": {
"events": {
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
"0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
"0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
"0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
},
"links": {},
"address": "0x836d470bAb3a80db54EB10a99a208eB4A0Bb6006",
"transactionHash": "0xd69eae855614650f59749c023a5f2cd7f7b3cb26e8e79629a4760edaff8114de"
},
"1644989050832": {
"events": {
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
@ -24591,8 +24767,8 @@
"transactionHash": "0x2aa2228bf82bd6e8dd3428eea27acde22b735ddcf4f2ee7de8370aac17fa2a07"
}
},
"schemaVersion": "3.4.3",
"updatedAt": "2022-04-25T07:18:22.717Z",
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-08T03:23:30.273Z",
"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

28201
build/contracts/BEShard.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -27727,6 +27727,69 @@
"address": "0x8426F1359998F5A43Ee1D63c3f805167eF0376Df",
"transactionHash": "0x5b0bcf76a9be4b6edabba81c69d903a34a3e558f169e75dfb8519953b248bd42"
},
"5777": {
"events": {
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
"0x61831e16e0d26017f5b69b7bc5690fe2c4aefb4625c0c082c289672846849e4a": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "evolveEventId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenEvolved",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "tokenBurned",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "chip",
"type": "uint256"
}
],
"name": "TokenEvolved",
"type": "event"
}
},
"links": {},
"address": "0x0B9f6Eb1b0156c0A2F3E66F646C398e9a6079467",
"transactionHash": "0x161bd28bd04eae1f58dea60e5b3985ce64e650d571d0958e09a5cf2df9c8f3d0"
},
"1644989050832": {
"events": {},
"links": {},
@ -27734,8 +27797,8 @@
"transactionHash": "0x11f0147bb5ee578a4e3d17d4e82593c52e06ccdfd272416c521e850abb64eb39"
}
},
"schemaVersion": "3.4.3",
"updatedAt": "2022-04-25T07:18:22.786Z",
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-08T03:23:30.330Z",
"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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -33795,6 +33795,81 @@
"address": "0x3036B6F684788241AC9bE20757cc4164a8B29a94",
"transactionHash": "0x5e00b328eff3e718a94e5f0f4e11d38f0635d3308b48bd89ae652c40bda80539"
},
"5777": {
"events": {
"0x7ec91832f8e94cceb462065487af39394e7520f22662d527e383864c041380cf": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "contractAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "paymentToken",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fee",
"type": "uint256"
}
],
"name": "MatchTransaction",
"type": "event"
},
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
}
},
"links": {},
"address": "0x6B6e81f30e7b495e465f63aA422226F70152EA69",
"transactionHash": "0x710ec6374a78f7933e57472940de4c6b13650ad3995b2fcab29cd04b3b5171ca"
},
"1644989050832": {
"events": {
"0x7ec91832f8e94cceb462065487af39394e7520f22662d527e383864c041380cf": {
@ -33871,8 +33946,8 @@
"transactionHash": "0x6e5536969959bc198613401674cc9d64ba959c2af0a6f564b339796496ed599e"
}
},
"schemaVersion": "3.4.3",
"updatedAt": "2022-04-25T07:18:22.764Z",
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-08T03:23:30.312Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -3167,6 +3167,18 @@
"address": "0xD1e11C344f1d9Fd4D4D53d08D97A8126fF0dA90a",
"transactionHash": "0xcfac0cf322bbb09cdf7b03efe4e239eb117fd7713c9c819337a27a65b15fac43"
},
"5777": {
"events": {},
"links": {},
"address": "0x37E717Eb6b722B092a06583dcE7Ce75703e35C94",
"transactionHash": "0x6c9001ea61f908bfadcf423824496540546a5a73a5210d94137c862bcdbd0394"
},
"80001": {
"events": {},
"links": {},
"address": "0x09F0dFFA584B1277D7c4E44265a6b5D03303Fc99",
"transactionHash": "0x31f6693ce28a8f5cb03dcd916b69c8a220e258dcb54c8b3e5e99f9c25d2c6041"
},
"1644989050832": {
"events": {},
"links": {},
@ -3175,7 +3187,7 @@
}
},
"schemaVersion": "3.4.3",
"updatedAt": "2022-04-25T07:18:22.854Z",
"updatedAt": "2022-08-08T04:54:18.781Z",
"networkType": "ethereum",
"devdoc": {
"kind": "dev",

View File

@ -8964,6 +8964,57 @@
"address": "0x19cCF926c38Cf421B13C31C0B08E1173d9DF4645",
"transactionHash": "0xe79086beec89c64c0b8b083efe2d502c955d331dc8b21370097b0c21246f0b04"
},
"5777": {
"events": {
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
"0xdf1b2b09e9800d31c599375056be9f9e4eb37f078102643600c4e149714efaad": {
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "contractAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "TokenMinted",
"type": "event"
}
},
"links": {},
"address": "0x9cA9cE6f832F74989d8369a9F5bBD4e02f605dBd",
"transactionHash": "0x1c3ef3bd93888ae0e00e683446d5e59006532cd5216b70414b3a9b141e8a244d"
},
"1644989050832": {
"events": {},
"links": {},
@ -8971,8 +9022,8 @@
"transactionHash": "0x1f324550ce60e12971357db375242f7329930fad8939e3b8487e72c2c85063de"
}
},
"schemaVersion": "3.4.3",
"updatedAt": "2022-04-25T07:18:22.776Z",
"schemaVersion": "3.4.4",
"updatedAt": "2022-08-08T03:23:30.322Z",
"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

@ -1,21 +1,20 @@
const market = {
feeToAddress: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e",
mallFeeAddress: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e",
feeToAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39",
mallFeeAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39",
paymentTokens: [
"0x0039f574ee5cc39bdd162e9a88e3eb1f111baf48", // USDT
],
}
const admins = {
admin: "0x760888706690CA0eB1EeF1E84787E05fc96e01F0",
admin: "0x50A8e60041A206AcaA5F844a1104896224be6F39",
proposers: [
"0x760888706690CA0eB1EeF1E84787E05fc96e01F0",
"0x760888706690CA0eB1EeF1E84787E05fc96e01F0"
"0x50A8e60041A206AcaA5F844a1104896224be6F39",
"0xb59f7DE6B6544a1d12df90a317dC3b1E037AF9A3"
],
executors: [
"0xC8EaDE915060491303B8062b743cC61687eD9d7e",
"0xC8EaDE915060491303B8062b743cC61687eD9d7e",
"0xC8EaDE915060491303B8062b743cC61687eD9d7e"
"0x50A8e60041A206AcaA5F844a1104896224be6F39",
"0xb59f7DE6B6544a1d12df90a317dC3b1E037AF9A3"
]
}

32
config/config_22.js Normal file
View File

@ -0,0 +1,32 @@
const market = {
feeToAddress: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e",
mallFeeAddress: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e",
paymentTokens: [
"0x0039f574ee5cc39bdd162e9a88e3eb1f111baf48", // USDT
],
}
const admins = {
admin: "0x760888706690CA0eB1EeF1E84787E05fc96e01F0",
proposers: [
"0x760888706690CA0eB1EeF1E84787E05fc96e01F0",
"0x760888706690CA0eB1EeF1E84787E05fc96e01F0"
],
executors: [
"0xC8EaDE915060491303B8062b743cC61687eD9d7e",
"0xC8EaDE915060491303B8062b743cC61687eD9d7e",
"0xC8EaDE915060491303B8062b743cC61687eD9d7e"
]
}
const token = {
baseTokenURI: 'https://market.cebg.games/api/nft/info/',
}
var config = {
market,
admins,
token
}
module.exports = config;

View File

@ -0,0 +1,294 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
abstract contract BEBase1155 is ERC1155, AccessControl {
using Strings for uint256;
bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant BURN_ROLE = keccak256("BURN_ROLE");
bytes32 public constant LOCK_ROLE = keccak256("LOCK_ROLE");
mapping(uint256 => bool) public lockedTokens;
mapping(address => uint256[]) private _ownedTokens;
mapping(address => mapping(uint256 => uint256)) private _ownedTokensIndex;
mapping(uint256 => uint256) private _totalSupply;
struct TokenStruct {
uint256 tokenId;
uint256 amount;
}
constructor() ERC1155("https://market.cebg.games/api/nft/info/{id}") {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(URI_SETTER_ROLE, msg.sender);
}
function setURI(string memory newuri) external onlyRole(URI_SETTER_ROLE) {
_setURI(newuri);
}
function mint(
address account,
uint256 id,
uint256 amount,
bytes memory data
) external onlyRole(MINTER_ROLE) {
_mint(account, id, amount, data);
}
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) external onlyRole(MINTER_ROLE) {
_mintBatch(to, ids, amounts, data);
}
function burn(
address account,
uint256 id,
uint256 value
) external onlyRole(BURN_ROLE) {
_burn(account, id, value);
}
function burnBatch(
address account,
uint256[] memory ids,
uint256[] memory values
) external onlyRole(BURN_ROLE) {
_burnBatch(account, ids, values);
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC1155, AccessControl)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
/**
* @dev Add factory to mint/burn item
*/
function setMintFactory(address factory)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_grantRole(MINTER_ROLE, factory);
_grantRole(BURN_ROLE, factory);
}
/**
* @dev Remove factory
*/
function removeMintFactory(address factory)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_revokeRole(MINTER_ROLE, factory);
_revokeRole(BURN_ROLE, factory);
}
/**
* @dev Total amount of tokens in with a given id.
*/
function totalSupply(uint256 id) external view virtual returns (uint256) {
return _totalSupply[id];
}
/**
* @dev Indicates whether any token exist with a given id, or not.
*/
function exists(uint256 id) external view virtual returns (bool) {
return _totalSupply[id] > 0;
}
function grantLockRole(address account)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_grantRole(LOCK_ROLE, account);
}
function revokeLockRole(address account)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_revokeRole(LOCK_ROLE, account);
}
/**
* @dev Lock token to use in game or for rental
*/
function lock(uint256 id) external onlyRole(LOCK_ROLE) {
require(_totalSupply[id] > 0, "Must be valid tokenId");
require(!lockedTokens[id], "Token has already locked");
lockedTokens[id] = true;
}
function lockBatch(uint256[] memory ids) external onlyRole(LOCK_ROLE) {
uint256 len = ids.length;
for (uint256 i = 0; i < len; ++i) {
uint256 id = ids[i];
require(_totalSupply[id] > 0, "Must be valid tokenId");
require(!lockedTokens[id], "Token has already locked");
lockedTokens[id] = true;
}
}
/**
* @dev Unlock token to use blockchain or sale on marketplace
*/
function unlock(uint256 id) external onlyRole(LOCK_ROLE) {
require(_totalSupply[id] > 0, "Must be valid tokenId");
require(lockedTokens[id], "Token has already unlocked");
lockedTokens[id] = false;
}
function unlockBatch(uint256[] memory ids) external onlyRole(LOCK_ROLE) {
uint256 len = ids.length;
for (uint256 i = 0; i < len; ++i) {
uint256 id = ids[i];
require(_totalSupply[id] > 0, "Must be valid tokenId");
require(lockedTokens[id], "Token has already unlocked");
lockedTokens[id] = false;
}
}
/**
* @dev Get lock status
*/
function isLocked(uint256 id) external view returns (bool) {
return lockedTokens[id];
}
function isLockedBatch(uint256[] memory ids)
external
view
returns (bool[] memory)
{
uint256 len = ids.length;
bool[] memory results = new bool[](len);
for (uint256 i = 0; i < len; ++i) {
results[i] = lockedTokens[ids[i]];
}
return results;
}
/**
* @dev See {ERC1155-_beforeTokenTransfer}.
*/
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override {
super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
uint256 len = ids.length;
for (uint256 i = 0; i < len; ++i) {
require(!lockedTokens[ids[i]], "Can not transfer locked token");
}
if (from == address(0)) {
// mint nft
for (uint256 i = 0; i < len; ++i) {
_totalSupply[ids[i]] += amounts[i];
}
} else if (from != to) {
// transfer from -> to
for (uint256 i = 0; i < len; ++i) {
_removeTokenFromOwnerEnumeration(from, ids[i], amounts[i]);
}
}
if (to == address(0)) {
// burn nft
for (uint256 i = 0; i < len; ++i) {
_totalSupply[ids[i]] -= amounts[i];
}
} else if (to != from) {
// mint or transfer from -> to
for (uint256 i = 0; i < len; ++i) {
_addTokenToOwnerEnumeration(to, ids[i]);
}
}
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
if (
_ownedTokensIndex[to][tokenId] == 0 && balanceOf(to, tokenId) == 0
) {
_ownedTokensIndex[to][tokenId] = _ownedTokens[to].length;
_ownedTokens[to].push(tokenId);
}
}
function _removeTokenFromOwnerEnumeration(
address from,
uint256 tokenId,
uint256 amount
) private {
uint256 balance = balanceOf(from, tokenId);
if (balance == amount) {
uint256 lastTokenIndex = _ownedTokens[from].length - 1;
uint256 tokenIndex = _ownedTokensIndex[from][tokenId];
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[from][lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[from][tokenId];
_ownedTokens[from].pop();
}
}
function userTokens(
address user,
uint256 start,
uint256 page
) external view returns (TokenStruct[] memory) {
uint256 size = _ownedTokens[user].length;
uint256 max = size;
uint256 pageSize = 0;
if (start < size) {
if (start + page < size) {
pageSize = page;
max = start + page;
} else {
pageSize = size - start;
}
}
TokenStruct[] memory results = new TokenStruct[](pageSize);
if (pageSize > 0) {
for (uint256 i = start; i < max; ++i) {
TokenStruct memory dataObj;
uint256 tokenId = _ownedTokens[user][i];
dataObj.tokenId = tokenId;
dataObj.amount = balanceOf(user, tokenId);
results[i - start] = dataObj;
}
}
return results;
}
function tokenTypes(address user) external view returns (uint256) {
return _ownedTokens[user].length;
}
}

View File

@ -4,277 +4,8 @@ pragma solidity 0.8.10;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./BEBase1155.sol";
contract BEChip1155 is ERC1155, AccessControl {
bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant BURN_ROLE = keccak256("BURN_ROLE");
bytes32 public constant LOCK_ROLE = keccak256("LOCK_ROLE");
mapping(uint256 => bool) public lockedTokens;
mapping(address => uint256[]) private _ownedTokens;
mapping(address => mapping(uint256 => uint256)) private _ownedTokensIndex;
mapping(uint256 => uint256) private _totalSupply;
constructor() ERC1155("https://market.cebg.games/api/nft/info/{id}") {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(URI_SETTER_ROLE, msg.sender);
}
function setURI(string memory newuri) external onlyRole(URI_SETTER_ROLE) {
_setURI(newuri);
}
function mint(
address account,
uint256 id,
uint256 amount,
bytes memory data
) external onlyRole(MINTER_ROLE) {
_mint(account, id, amount, data);
}
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) external onlyRole(MINTER_ROLE) {
_mintBatch(to, ids, amounts, data);
}
function burn(
address account,
uint256 id,
uint256 value
) external onlyRole(BURN_ROLE) {
_burn(account, id, value);
}
function burnBatch(
address account,
uint256[] memory ids,
uint256[] memory values
) external onlyRole(BURN_ROLE) {
_burnBatch(account, ids, values);
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC1155, AccessControl)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
/**
* @dev Add factory to mint/burn item
*/
function setMintFactory(address factory)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_grantRole(MINTER_ROLE, factory);
_grantRole(BURN_ROLE, factory);
}
/**
* @dev Remove factory
*/
function removeMintFactory(address factory)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_revokeRole(MINTER_ROLE, factory);
_revokeRole(BURN_ROLE, factory);
}
/**
* @dev Total amount of tokens in with a given id.
*/
function totalSupply(uint256 id) public view virtual returns (uint256) {
return _totalSupply[id];
}
/**
* @dev Indicates whether any token exist with a given id, or not.
*/
function exists(uint256 id) external view virtual returns (bool) {
return BEChip1155.totalSupply(id) > 0;
}
function grantLockRole(address account)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_grantRole(LOCK_ROLE, account);
}
function revokeLockRole(address account)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
_revokeRole(LOCK_ROLE, account);
}
/**
* @dev Lock token to use in game or for rental
*/
function lock(uint256 id) external onlyRole(LOCK_ROLE) {
require(_totalSupply[id] > 0, "Must be valid tokenId");
require(!lockedTokens[id], "Token has already locked");
lockedTokens[id] = true;
}
function lockBatch(uint256[] memory ids) external onlyRole(LOCK_ROLE) {
uint256 len = ids.length;
for (uint256 i = 0; i < len; ++i) {
uint256 id = ids[i];
require(_totalSupply[id] > 0, "Must be valid tokenId");
require(!lockedTokens[id], "Token has already locked");
lockedTokens[id] = true;
}
}
/**
* @dev Unlock token to use blockchain or sale on marketplace
*/
function unlock(uint256 id) external onlyRole(LOCK_ROLE) {
require(_totalSupply[id] > 0, "Must be valid tokenId");
require(lockedTokens[id], "Token has already unlocked");
lockedTokens[id] = false;
}
function unlockBatch(uint256[] memory ids) external onlyRole(LOCK_ROLE) {
uint256 len = ids.length;
for (uint256 i = 0; i < len; ++i) {
uint256 id = ids[i];
require(_totalSupply[id] > 0, "Must be valid tokenId");
require(lockedTokens[id], "Token has already unlocked");
lockedTokens[id] = false;
}
}
/**
* @dev Get lock status
*/
function isLocked(uint256 id) external view returns (bool) {
return lockedTokens[id];
}
function isLockedBatch(uint256[] memory ids) external view
returns (bool[] memory) {
uint256 len = ids.length;
bool[] memory results = new bool[](len);
for (uint256 i = 0; i < len; ++i) {
results[i] = lockedTokens[ids[i]];
}
return results;
}
/**
* @dev See {ERC1155-_beforeTokenTransfer}.
*/
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override {
super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
uint256 len = ids.length;
for (uint256 i = 0; i < len; ++i) {
require(!lockedTokens[ids[i]], "Can not transfer locked token");
}
if (from == address(0)) {
// mint nft
for (uint256 i = 0; i < len; ++i) {
_totalSupply[ids[i]] += amounts[i];
}
} else if (from != to) {
// transfer from -> to
for (uint256 i = 0; i < len; ++i) {
_removeTokenFromOwnerEnumeration(from, ids[i], amounts[i]);
}
}
if (to == address(0)) {
// burn nft
for (uint256 i = 0; i < len; ++i) {
_totalSupply[ids[i]] -= amounts[i];
}
} else if (to != from) {
// mint or transfer from -> to
for (uint256 i = 0; i < len; ++i) {
_addTokenToOwnerEnumeration(to, ids[i]);
}
}
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
if (
_ownedTokensIndex[to][tokenId] == 0 && balanceOf(to, tokenId) == 0
) {
_ownedTokensIndex[to][tokenId] = _ownedTokens[to].length;
_ownedTokens[to].push(tokenId);
}
}
function _removeTokenFromOwnerEnumeration(
address from,
uint256 tokenId,
uint256 amount
) private {
uint256 balance = balanceOf(from, tokenId);
if (balance == amount) {
uint256 lastTokenIndex = _ownedTokens[from].length - 1;
uint256 tokenIndex = _ownedTokensIndex[from][tokenId];
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[from][lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[from][tokenId];
_ownedTokens[from].pop();
}
}
function userTokens(
address user,
uint256 start,
uint256 page
) external view returns (uint256[] memory) {
uint256 size = _ownedTokens[user].length;
uint256 max = size;
uint256 pageSize = 0;
if (start < size) {
if (start + page < size) {
pageSize = page;
max = start + page;
} else {
pageSize = size - start;
}
}
uint256[] memory results = new uint256[](pageSize);
if (pageSize > 0) {
for (uint256 i = start; i < max; ++i) {
uint256 tokenId = _ownedTokens[user][i];
results[i - start] = tokenId;
}
}
return results;
}
function tokenTypes(address user) external view returns (uint256) {
return _ownedTokens[user].length;
}
contract BEChip1155 is BEBase1155 {
mapping(uint256 => uint256) public tokenLevels;
}

View File

@ -3,42 +3,13 @@ pragma solidity 0.8.10;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "../interfaces/IBEERC1155.sol";
import "../interfaces/IBEERC721.sol";
import "../HasSignature.sol";
interface IMintableERC1155 is IERC1155 {
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) external;
function mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) external;
function burn(
address owner,
uint256 tokenId,
uint256 amount
) external;
function exists(uint256 id) external view returns (bool);
}
interface IBurnableERC721 is IERC721 {
function burn(address owner, uint256 tokenId) external;
}
contract BEChipFactory is Ownable, Initializable, HasSignature {
IMintableERC1155 public chip;
IBurnableERC721 public chipOld;
IBEERC1155 public chip;
IBEERC721 public chipOld;
address public executor;
@ -64,8 +35,8 @@ contract BEChipFactory is Ownable, Initializable, HasSignature {
initializer
onlyOwner
{
chip = IMintableERC1155(_erc1155);
chipOld = IBurnableERC721(_erc721);
chip = IBEERC1155(_erc1155);
chipOld = IBEERC721(_erc721);
}
/**
@ -149,6 +120,19 @@ contract BEChipFactory is Ownable, Initializable, HasSignature {
chipOld.burn(to, ids[1]);
emit Chip1155Activate(to, ids[1], ids[0]);
}
//TODO::
// function upgradeChip(
// uint256[] memory ids,
// uint256 saltNonce,
// bytes calldata signature
// ) external {
// require(ids.length > 1, "BEChipFactory: ids length mismatch");
// require(
// !usedSignatures[signature],
// "BEChipFactory:: activateOneChip: signature used. please send another transaction with new signature"
// );
// address to = _msgSender();
// }
function getMessageHash(
address _to,

View File

@ -0,0 +1,13 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./BEBase1155.sol";
/**
* for Hero and Weapon shard
*/
contract BEShard is BEBase1155 {
}

View File

@ -0,0 +1,81 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "../interfaces/IBEERC1155.sol";
import "../interfaces/IBEERC721.sol";
import "../HasSignature.sol";
contract BEShardFactory is Ownable, Initializable, HasSignature {
address public executor;
IBEERC1155 public shard;
IBEERC721 public hero;
IBEERC721 public weapon;
mapping(bytes => bool) public usedSignatures;
constructor() HasSignature("BEShardFactory", "1") {}
event ShardMinted(
address contractAddress,
address indexed to,
uint256[] ids
);
function init(address[3] calldata nfts) external initializer onlyOwner {
shard = IBEERC1155(nfts[0]);
hero = IBEERC721(nfts[1]);
weapon = IBEERC721(nfts[2]);
}
/**
* @dev update executor
*/
function updateExecutor(address account) external onlyOwner {
require(account != address(0), "address can not be zero");
executor = account;
}
function mintShardBatch(
uint256[] memory ids,
uint256[] memory amounts,
uint256 saltNonce,
bytes calldata signature
) external {
uint256 len = ids.length;
require(len > 0, "BEShardFactory: ids cannot be empty");
require(
len == amounts.length,
"BEShardFactory: ids and amounts length mismatch"
);
require(
!usedSignatures[signature],
"BEShardFactory:: mintShardBatch: signature used. please send another transaction with new signature"
);
address to = _msgSender();
uint256[] memory signArray = new uint256[](len * 2);
for (uint256 i = 0; i < len; ++i) {
signArray[i * 2] = ids[i];
signArray[i * 2 + 1] = amounts[i];
}
bytes32 criteriaMessageHash = getMessageHash(to, saltNonce, signArray);
checkSigner(executor, criteriaMessageHash, signature);
shard.mintBatch(to, ids, amounts, "");
usedSignatures[signature] = true;
emit ShardMinted(address(shard), to, ids);
}
function getMessageHash(
address _to,
uint256 _saltNonce,
uint256[] memory _ids
) public pure returns (bytes32) {
bytes memory encoded = abi.encodePacked(_to, _saltNonce);
uint256 len = _ids.length;
for (uint256 i = 0; i < len; ++i) {
encoded = bytes.concat(encoded, abi.encodePacked(_ids[i]));
}
return keccak256(encoded);
}
}

View File

@ -0,0 +1,34 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
interface IBEERC1155 is IERC1155 {
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) external;
function mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) external;
function burn(
address owner,
uint256 tokenId,
uint256 amount
) external;
function burnBatch(
address owner,
uint256[] memory ids,
uint256[] memory values
) external;
function exists(uint256 id) external view returns (bool);
}

View File

@ -0,0 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
interface IBEERC721 is IERC721 {
function burn(address owner, uint256 tokenId) external;
}

View File

@ -0,0 +1,35 @@
const Shard = artifacts.require('chip1155/BEShard');
const ShardFactory = artifacts.require('chip1155/BEShardFactory');
const Hero = artifacts.require('BEHero');
const Equip = artifacts.require('BEEquipment');
const config = require("../config/config");
module.exports = async function (deployer, network, accounts) {
await deployer.deploy(Shard);
const shardInstance = await Shard.deployed();
if(shardInstance) {
console.log("Shard 1155 successfully deployed.")
}
await deployer.deploy(ShardFactory);
const factoryInstance = await ShardFactory.deployed();
if(factoryInstance) {
console.log("Shard 1155 Factory successfully deployed.")
}
const heroInstance = await Hero.deployed();
const equipInstance = await Equip.deployed();
await factoryInstance.init([shardInstance.address,
heroInstance.address,
equipInstance.address
]);
await factoryInstance.updateExecutor(config.admins.admin);
console.log("Shard 1155 Factory successfully update setting.")
await shardInstance.setMintFactory(factoryInstance.address);
console.log("Shard 1155 successfully update factory.")
await shardInstance.grantLockRole(config.admins.admin);
console.log("Shard 1155 successfully grantLockRole.")
await heroInstance.setMintFactory(factoryInstance.address);
console.log("Hero successfully setMintFactory.")
await equipInstance.setMintFactory(factoryInstance.address);
console.log("Equip successfully setMintFactory.")
}

View File

@ -13,6 +13,8 @@ const BoxProxy = artifacts.require('mysterybox/MysteryBoxProxy');
const NftProxy = artifacts.require('activate/NFTActivateProxy');
const Chip1155 = artifacts.require('chip1155/BEChip1155');
const ChipFactory = artifacts.require('chip1155/BEChipFactory');
const Shard = artifacts.require('chip1155/BEShard');
const ShardFactory = artifacts.require('chip1155/BEShardFactory');
const config = require("../config/config");
@ -46,6 +48,8 @@ module.exports = async function (deployer, network, accounts) {
const nftProxyInstance = await NftProxy.deployed();
const chip1155Instance = await Chip1155.deployed();
const chipFactoryInstance = await ChipFactory.deployed();
const shardInstance = await Shard.deployed();
const shardFactoryInstance = await ShardFactory.deployed();
console.log('============= begin generate config ==============')
let jsons = []
jsons.push({name: 'coin', json: 'assets/contracts/BECoin.json', address: coinInstance.address})
@ -63,6 +67,8 @@ module.exports = async function (deployer, network, accounts) {
jsons.push({name: 'activateproxy', json: 'assets/contracts/NFTActivateProxy.json', address: nftProxyInstance.address})
jsons.push({name: 'chip1155', json: 'assets/contracts/BEChip1155.json', address: chip1155Instance.address})
jsons.push({name: 'chipfactory', json: 'assets/contracts/BEChipFactory.json', address: chipFactoryInstance.address})
jsons.push({name: 'shard', json: 'assets/contracts/BEShard.json', address: shardInstance.address})
jsons.push({name: 'shardfactory', json: 'assets/contracts/BEShardFactory.json', address: shardFactoryInstance.address})
console.log(JSON.stringify(jsons));
console.log(`export const userAddress = '${accounts[0]}';`)
console.log(`export const privateKey = '';`)

View File

@ -10,7 +10,8 @@
"deploy:20": "truffle migrate --network lan20 --compile-none",
"deploy:22": "truffle migrate --network lan22 --compile-none",
"deploy:bsctest": "truffle migrate --network bsc_testnet --compile-none",
"deploy:kcctest": "truffle migrate --network kcc_testnet --compile-none"
"deploy:kcctest": "truffle migrate --network kcc_testnet --compile-none",
"deploy:polygon_testnet": "truffle migrate --network polygon_testnet --compile-none"
},
"author": "",
"license": "ISC",

View File

@ -81,7 +81,7 @@ module.exports = {
// production: true // Treats this network as if it was a public net. (default: false)
// }
polygon_testnet: {
provider: () => new HDWalletProvider(kccTestnetKey, `https://matic-mumbai.chainstacklabs.com`),
provider: () => new HDWalletProvider(kccTestnetKey, `https://rpc-mumbai.maticvigil.com`),
network_id: 80001,
confirmations: 6,
timeoutBlocks: 5000,