Address Contract Verified
Address
0x08C57779C239409e8244916eF1471241556444b8
Balance
0 ETH
Nonce
1
Code Size
17428 bytes
Creator
0x9f400619...2cFA at tx 0x3260d5b3...efc8c6
Indexed Transactions
0
Contract Bytecode
17428 bytes
0x6080604052600436106102ed5760003560e01c80638a1b917c11610187578063c7f5ef29116100dd578063c7f5ef29146108c6578063c99874ce146108db578063d1d7f60b146108fb578063d3a04b2a14610911578063d6df3b1e14610927578063df65da8d1461093d578063e2caa1531461095d578063e53959e71461099a578063e8532b5f146109ba578063eb611ad0146109da578063eb64be9e146109fa578063eb6dba0f14610a1a578063ebf7b17714610a30578063f2fde38b14610a50578063fa3b19e314610a70578063fc2d95a114610a9057600080fd5b80638a1b917c146106e35780638c938119146106f85780638da5cb5b146107255780638eae6e4e1461074b57806393be04851461076057806397eea5081461078057806398fd8569146107a05780639b3ffe35146107b6578063a1511bb5146107cc578063a9301760146107ec578063b2656c6c1461080c578063b2eb46271461082c578063b90dc5b71461084c578063bd3f754e14610879578063bf0399c11461089957600080fd5b806342f91f3f1161024757806342f91f3f1461051657806343af2c48146105365780634a4564d1146105565780634f1ef286146105765780634fc83a60146105895780635002104b146105a95780635148a657146105c957806352d1902d146105e957806354fd4d50146105fe5780635dc44aed146106135780635fcc3ede1461063357806362bfb59814610653578063715018a61461068257806373c4e1381461069757806378785a1f146106ad57806388a5123e146106c357600080fd5b8063025d7dc8146102f25780630516b07b1461031457806307185e7c1461034b578063096eb0fb1461037857806312c317d8146103a657806316f3383e146103c65780631cdf6854146103e657806321b80f7e14610420578063324219c81461044057806332cb6b0c1461046057806335edf06a146104765780633659cfe61461049657806338fe2e7f146104b65780633cf4ba51146104d65780633e52b1cd146104f6575b600080fd5b3480156102fe57600080fd5b5061031261030d3660046131a5565b610ab0565b005b34801561032057600080fd5b5061033461032f3660046131fc565b610b23565b6040516103429291906132c7565b60405180910390f35b34801561035757600080fd5b5061036b6103663660046131fc565b610b47565b60405161034291906132e7565b34801561038457600080fd5b506103986103933660046132f8565b610be1565b60405161034292919061334b565b3480156103b257600080fd5b506103126103c136600461337a565b610c27565b3480156103d257600080fd5b5061036b6103e13660046131fc565b610d0e565b3480156103f257600080fd5b506104136104013660046131fc565b600090815260da602052604090205490565b60405161034291906133ca565b34801561042c57600080fd5b5061031261043b3660046131a5565b610d27565b34801561044c57600080fd5b5061036b61045b3660046131fc565b610d8e565b34801561046c57600080fd5b5061041360ca5481565b34801561048257600080fd5b50610312610491366004613429565b610da7565b3480156104a257600080fd5b506103126104b1366004613470565b610e52565b3480156104c257600080fd5b506103126104d13660046131a5565b610f1a565b3480156104e257600080fd5b506103126104f1366004613491565b610f81565b34801561050257600080fd5b506103126105113660046131a5565b6110f2565b34801561052257600080fd5b5061036b6105313660046131fc565b611159565b34801561054257600080fd5b506103126105513660046131a5565b611172565b34801561056257600080fd5b506103126105713660046131a5565b6111d9565b61031261058436600461358a565b611240565b34801561059557600080fd5b506103126105a43660046135ac565b6112f9565b3480156105b557600080fd5b506103126105c43660046131fc565b6113c3565b3480156105d557600080fd5b5061036b6105e43660046131fc565b61156c565b3480156105f557600080fd5b50610413611585565b34801561060a57600080fd5b5061036b6115e2565b34801561061f57600080fd5b5061036b61062e3660046131fc565b6115ef565b34801561063f57600080fd5b5061036b61064e3660046131fc565b611757565b34801561065f57600080fd5b5061067361066e3660046132f8565b611770565b604051610342939291906135fc565b34801561068e57600080fd5b506103126117be565b3480156106a357600080fd5b5061041360e95481565b3480156106b957600080fd5b5061041360e65481565b3480156106cf57600080fd5b506103126106de3660046131a5565b6117d2565b3480156106ef57600080fd5b50610413611839565b34801561070457600080fd5b506107186107133660046131fc565b611983565b604051610342919061365b565b34801561073157600080fd5b506097546001600160a01b03166040516103429190613669565b34801561075757600080fd5b50610413611a38565b34801561076c57600080fd5b5061031261077b3660046131fc565b611c13565b34801561078c57600080fd5b5061033461079b3660046131fc565b611efa565b3480156107ac57600080fd5b5061041360e45481565b3480156107c257600080fd5b5061041360ea5481565b3480156107d857600080fd5b506107186107e73660046131fc565b6120db565b3480156107f857600080fd5b5061036b6108073660046131fc565b61212f565b34801561081857600080fd5b506107186108273660046132f8565b612148565b34801561083857600080fd5b5061036b6108473660046131fc565b612201565b34801561085857600080fd5b506104136108673660046131fc565b60d96020526000908152604090205481565b34801561088557600080fd5b5061036b6108943660046131fc565b61221a565b3480156108a557600080fd5b506104136108b43660046131fc565b60d66020526000908152604090205481565b3480156108d257600080fd5b50610312612285565b3480156108e757600080fd5b506104136108f63660046131fc565b612371565b34801561090757600080fd5b5061041360e85481565b34801561091d57600080fd5b5061041360e35481565b34801561093357600080fd5b5061041360e75481565b34801561094957600080fd5b506103126109583660046131a5565b612392565b34801561096957600080fd5b5061098d6109783660046131fc565b60d76020526000908152604090205460ff1681565b6040516103429190613677565b3480156109a657600080fd5b506103126109b53660046131fc565b6123f9565b3480156109c657600080fd5b506103986109d53660046131fc565b6126d9565b3480156109e657600080fd5b5061036b6109f53660046131fc565b612711565b348015610a0657600080fd5b5061098d610a153660046131fc565b61277d565b348015610a2657600080fd5b5061041360e55481565b348015610a3c57600080fd5b50610312610a4b36600461371b565b6127a4565b348015610a5c57600080fd5b50610312610a6b366004613470565b6127b9565b348015610a7c57600080fd5b50610312610a8b3660046132f8565b6127f0565b348015610a9c57600080fd5b50610413610aab3660046131fc565b612a8b565b610ab8612aa2565b60e5548203610ad75760e58054906000610ad183613753565b91905055505b600082815260dd602090815260409091208251610af692840190612f69565b506000805160206143bf833981519152600283604051610b1792919061379b565b60405180910390a15050565b600081815260d66020526040812054606090610b3e90611efa565b91509150915091565b60e16020526000908152604090208054610b60906137bf565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8c906137bf565b8015610bd95780601f10610bae57610100808354040283529160200191610bd9565b820191906000526020600020905b815481529060010190602001808311610bbc57829003601f168201915b505050505081565b60d86020528160005260406000208181548110610bfd57600080fd5b6000918252602090912060029091020180546001909101546001600160a01b039091169250905082565b610c2f612aa2565b60cc548310610c595760405162461bcd60e51b8152600401610c5090613817565b60405180910390fd5b600060cc8481548110610c6e57610c6e613827565b9060005260206000209060020201905081816001015414610c9157600181018290555b80546001600160a01b03848116911614610cbf5780546001600160a01b0319166001600160a01b0384161781555b805460018201546040517fbd600ae250afb6a9ec9d47c5281ed1645b1ef795787e3e6cfd08e306f2c8866492610d00926001600160a01b039091169161334b565b60405180910390a150505050565b60db6020526000908152604090208054610b60906137bf565b610d2f612aa2565b60e8548203610d4e5760e88054906000610d4883613753565b91905055505b600082815260e0602090815260409091208251610d6d92840190612f69565b506000805160206143bf833981519152600583604051610b1792919061379b565b60e06020526000908152604090208054610b60906137bf565b610daf612aa2565b60cc5460005b82811015610e065781848483818110610dd057610dd0613827565b9050602002013510610df45760405162461bcd60e51b8152600401610c5090613817565b80610dfe81613753565b915050610db5565b50610e1360cd8484612fe9565b507f5a823d53bce129c994132366f6ebe065e29fe10b4d43958aa970ae20ee038e168383604051610e45929190613876565b60405180910390a1505050565b6001600160a01b037f00000000000000000000000008c57779c239409e8244916ef1471241556444b8163003610e9a5760405162461bcd60e51b8152600401610c50906138d4565b7f00000000000000000000000008c57779c239409e8244916ef1471241556444b86001600160a01b0316610ecc612acc565b6001600160a01b031614610ef25760405162461bcd60e51b8152600401610c509061392d565b610efb81612ae8565b60408051600080825260208201909252610f1791839190612af0565b50565b610f22612aa2565b60e9548203610f415760e98054906000610f3b83613753565b91905055505b600082815260e1602090815260409091208251610f6092840190612f69565b506000805160206143bf833981519152600683604051610b1792919061379b565b600054610100900460ff1615808015610fa15750600054600160ff909116105b80610fc25750610fb030612bd2565b158015610fc2575060005460ff166001145b610fde5760405162461bcd60e51b8152600401610c5090613988565b6000805460ff191660011790558015611001576000805461ff0019166101001790555b611009612be1565b60408051808201909152600b8082526a056657273696f6e20322e360ac1b602090920191825261103b9160c991612f69565b5060cb80546001600160a01b031916734e1f41613c9084fdb9e34e11fae9412427480e56179055612b6060ca55611073600087611172565b61107e600086612392565b6110896000856110f2565b611094600084610f1a565b61109f6000836117d2565b80156110ea576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906110e1906001906139b5565b60405180910390a15b505050505050565b6110fa612aa2565b60e75482036111195760e7805490600061111383613753565b91905055505b600082815260df60209081526040909120825161113892840190612f69565b506000805160206143bf833981519152600483604051610b1792919061379b565b60dc6020526000908152604090208054610b60906137bf565b61117a612aa2565b60e35482036111995760e3805490600061119383613753565b91905055505b600082815260db6020908152604090912082516111b892840190612f69565b506000805160206143bf833981519152600083604051610b1792919061379b565b6111e1612aa2565b60e45482036112005760e480549060006111fa83613753565b91905055505b600082815260dc60209081526040909120825161121f92840190612f69565b506000805160206143bf833981519152600183604051610b1792919061379b565b6001600160a01b037f00000000000000000000000008c57779c239409e8244916ef1471241556444b81630036112885760405162461bcd60e51b8152600401610c50906138d4565b7f00000000000000000000000008c57779c239409e8244916ef1471241556444b86001600160a01b03166112ba612acc565b6001600160a01b0316146112e05760405162461bcd60e51b8152600401610c509061392d565b6112e982612ae8565b6112f582826001612af0565b5050565b611301612aa2565b6040805180820182526001600160a01b0384811682526020820184815260cc805460018101825560009190915292517f47197230e1e4b29fc0bd84d7d78966c0925452aff72a2a121538b102457e9ebe600290940293840180546001600160a01b0319169190931617909155517f47197230e1e4b29fc0bd84d7d78966c0925452aff72a2a121538b102457e9ebf90910155517f68296cdc26ec7f35e668d946de3cb35b52b80ce2f2b472741ef9190ae794306e90610b17908490849061334b565b60cb546040516331a9108f60e11b815233916001600160a01b031690636352211e906113f39085906004016133ca565b602060405180830381865afa158015611410573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143491906139ce565b6001600160a01b03161461145a5760405162461bcd60e51b8152600401610c5090613a10565b600081815260d7602052604081205460ff16600281111561147d5761147d61321d565b0361149a5760405162461bcd60e51b8152600401610c5090613a45565b600081815260d760209081526040808320805460ff1990811690915560da835281842082516060810184528581528085018690524293810193909352805460018181018355918652939094208251600290940201805492949093928492169083600381111561150b5761150b61321d565b0217905550602082015181546001600160a01b0390911661010002610100600160a81b03199091161781556040918201516001909101555160008051602061437883398151915290611561908390600090613a55565b60405180910390a150565b60df6020526000908152604090208054610b60906137bf565b6000306001600160a01b037f00000000000000000000000008c57779c239409e8244916ef1471241556444b816146115cf5760405162461bcd60e51b8152600401610c5090613ac5565b5060008051602061435883398151915290565b60c98054610b60906137bf565b600081815260dc6020526040902080546060919061160c906137bf565b80601f0160208091040260200160405190810160405280929190818152602001828054611638906137bf565b80156116855780601f1061165a57610100808354040283529160200191611685565b820191906000526020600020905b81548152906001019060200180831161166857829003601f168201915b50505050509050604051806020016040528060008152508051906020012081805190602001200361173057604051636179ad5360e11b815273c9e417b7e67e387026161e50875d512f29630d7b9063c2f35aa6906116e890600090600401613aea565b600060405180830381865afa158015611705573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261172d9190810190613b50565b90505b806040516020016117419190613bac565b6040516020818303038152906040529050919050565b60e26020526000908152604090208054610b60906137bf565b60da602052816000526040600020818154811061178c57600080fd5b60009182526020909120600290910201805460019091015460ff821693506101009091046001600160a01b0316915083565b6117c6612aa2565b6117d06000612c10565b565b6117da612aa2565b60ea5482036117f95760ea80549060006117f383613753565b91905055505b600082815260e260209081526040909120825161181892840190612f69565b506000805160206143bf833981519152600783604051610b1792919061379b565b6000805b60cd5481101561197f5760cc5460cd80548390811061185e5761185e613827565b9060005260206000200154108015611918575060cc60cd828154811061188657611886613827565b9060005260206000200154815481106118a1576118a1613827565b600091825260209182902060029091020154604080516399c712bb60e01b815290516001600160a01b03909216926399c712bb926004808401938290030181865afa1580156118f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119189190613d00565b1561196d5760cc60cd828154811061193257611932613827565b90600052602060002001548154811061194d5761194d613827565b9060005260206000209060020201600101548261196a9190613d21565b91505b8061197781613753565b91505061183d565b5090565b61198b613024565b600082815260da6020526040902080546119b75760405162461bcd60e51b8152600401610c5090613d68565b806000815481106119ca576119ca613827565b6000918252602090912060408051606081019091526002909202018054829060ff1660038111156119fd576119fd61321d565b6003811115611a0e57611a0e61321d565b8152815461010090046001600160a01b031660208201526001909101546040909101529392505050565b600080611a43611839565b905080600003611a565760001991505090565b6000611a628242613d8e565b6040805180820190915260008082526020820181905291925060005b60cd54811015611c065760cc5460cd805483908110611a9f57611a9f613827565b90600052602060002001541015611bf45760cc60cd8281548110611ac557611ac5613827565b906000526020600020015481548110611ae057611ae0613827565b6000918252602091829020604080518082018252600290930290910180546001600160a01b03168084526001909101548385015281516399c712bb60e01b81529151929550926399c712bb926004808401938290030181865afa158015611b4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6f9190613d00565b15611bc45760cc60cd8281548110611b8957611b89613827565b906000526020600020015481548110611ba457611ba4613827565b90600052602060002090600202016001015483611bc19190613d21565b92505b82841015611bf45760cd8181548110611bdf57611bdf613827565b90600052602060002001549550505050505090565b80611bfe81613753565b915050611a7e565b5060001994505050505090565b60cb546040516331a9108f60e11b815233916001600160a01b031690636352211e90611c439085906004016133ca565b602060405180830381865afa158015611c60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8491906139ce565b6001600160a01b031614611caa5760405162461bcd60e51b8152600401610c5090613a10565b600081815260d7602052604081205460ff166002811115611ccd57611ccd61321d565b03611cea5760405162461bcd60e51b8152600401610c5090613a45565b6000611cf4611a38565b90506000811215611d175760405162461bcd60e51b8152600401610c5090613dd6565b600060cc8281548110611d2c57611d2c613827565b6000918252602091829020604080518082018252600290930290910180546001600160a01b03168084526001909101549383019390935251635ae1f40d60e11b815290925063b5c3e81a90611d859086906004016133ca565b600060405180830381600087803b158015611d9f57600080fd5b505af1158015611db3573d6000803e3d6000fd5b505050600084815260d8602090815260408083208151808301835286516001600160a01b039081168252428286018181528454600180820187559589528789209451600291820290950180546001600160a01b0319169585169590951785559051938501939093558a875260da8652848720855160608101875260038082528b519094168189015295860191909152805480850182559087529490952083519490910201805492955093849260ff191691908490811115611e7657611e7661321d565b0217905550602082015181546001600160a01b0390911661010002610100600160a81b03199091161781556040918201516001909101555160008051602061437883398151915290611ecc908590600290613a55565b60405180910390a1600083815260d86020526040902054611ef5908490610a8b90600190613de6565b505050565b600081815260d7602052604081205460ff1690606090611f18611a38565b90506000836002811115611f2e57611f2e61321d565b03611f4357611f3c84612711565b91506120d5565b6002836002811115611f5757611f5761321d565b0361202b57600084815260d86020908152604080832060d990925282205481548110611f8557611f85613827565b6000918252602091829020604080518082018252600290930290910180546001600160a01b0316808452600190910154938301939093525163f251463760e01b815290925063f251463790611fde9088906004016133ca565b600060405180830381865afa158015611ffb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120239190810190613b50565b9250506120d5565b600081126120c95760cc818154811061204657612046613827565b600091825260209091206002909102015460405163f251463760e01b81526001600160a01b039091169063f2514637906120849087906004016133ca565b600060405180830381865afa1580156120a1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f3c9190810190613b50565b6120d284612711565b91505b50915091565b6120e3613024565b600082815260da60205260409020805461210f5760405162461bcd60e51b8152600401610c5090613d68565b8054819061211f90600190613de6565b815481106119ca576119ca613827565b60dd6020526000908152604090208054610b60906137bf565b612150613024565b600083815260da602052604090208054831061217e5760405162461bcd60e51b8152600401610c5090613817565b80838154811061219057612190613827565b6000918252602090912060408051606081019091526002909202018054829060ff1660038111156121c3576121c361321d565b60038111156121d4576121d461321d565b8152815461010090046001600160a01b031660208201526001909101546040909101529150505b92915050565b60de6020526000908152604090208054610b60906137bf565b606060008061223584600090815260da602052604090205490565b111561224b5761224483611983565b6040015190505b61225481612c62565b61225d42612c62565b60405160200161226e929190613dfd565b604051602081830303815290604052915050919050565b61228d612aa2565b60cc546122ac5760405162461bcd60e51b8152600401610c5090613e71565b60cc8054600091906122c090600190613de6565b815481106122d0576122d0613827565b60009182526020918290206040805180820190915260029092020180546001600160a01b03168252600101549181019190915260cc8054919250908061231857612318613e81565b60008281526020812060026000199093019283020180546001600160a01b031916815560010155905580516040517fff3e0cb1fb0fc64938fcd635ef1dc565a0e8221a05dcd37a0461ab78327809b19161156191613669565b60cd818154811061238157600080fd5b600091825260209091200154905081565b61239a612aa2565b60e65482036123b95760e680549060006123b383613753565b91905055505b600082815260de6020908152604090912082516123d892840190612f69565b506000805160206143bf833981519152600383604051610b1792919061379b565b60cb546040516331a9108f60e11b815233916001600160a01b031690636352211e906124299085906004016133ca565b602060405180830381865afa158015612446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246a91906139ce565b6001600160a01b0316146124905760405162461bcd60e51b8152600401610c5090613a10565b60cb54604051630dee0b8160e31b81526000916001600160a01b031690636f705c08906124c19085906004016133ca565b602060405180830381865afa1580156124de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125029190613eaf565b60048111156125135761251361321d565b036125305760405162461bcd60e51b8152600401610c5090613ef8565b6001600082815260d7602052604090205460ff1660028111156125555761255561321d565b036125725760405162461bcd60e51b8152600401610c5090613f31565b600081815260da602052604081205490036126105760cb54604051635597b88f60e11b8152829160d6916000916001600160a01b03169063ab2f711e906125bd9086906004016133ca565b602060405180830381865afa1580156125da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125fe9190613f4c565b81526020810191909152604001600020555b600081815260d7602090815260408083208054600160ff19918216811790925560da845282852083516060810185528381528086018790524294810194909452805480840182559086529390942082516002909402018054929490939284929116908360038111156126845761268461321d565b0217905550602082015181546001600160a01b0390911661010002610100600160a81b031990911617815560409182015160019182015590516000805160206143788339815191529161156191849190613a55565b60cc81815481106126e957600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b606061271c8261221a565b60ce54612728906115ef565b60cf54600090815260db6020908152604080832060d054845260de835281842060d154855260df845282852060e1855283862060d254875260e286529584902093516117419897969395929491939201613fdb565b600060ca5482111561278e57600080fd5b50600090815260d7602052604090205460ff1690565b6127ac612aa2565b6112f560ce826008613046565b6127c1612aa2565b6001600160a01b0381166127e75760405162461bcd60e51b8152600401610c50906140bb565b610f1781612c10565b600082815260d7602052604081205460ff1660028111156128135761281361321d565b036128305760405162461bcd60e51b8152600401610c5090613a45565b60cb546040516331a9108f60e11b815233916001600160a01b031690636352211e906128609086906004016133ca565b602060405180830381865afa15801561287d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a191906139ce565b6001600160a01b0316146128c75760405162461bcd60e51b8152600401610c5090613a10565b600082815260d8602052604090205481106128f45760405162461bcd60e51b8152600401610c50906140ee565b60006128ff836120db565b90506002815160038111156129165761291661321d565b0361297b57600083815260d86020526040902080548390811061293b5761293b613827565b600091825260209182902060029091020154908201516001600160a01b0391821691160361297b5760405162461bcd60e51b8152600401610c509061413e565b600083815260d96020908152604080832085905560d78252808320805460ff1916600290811790915560da8352818420825160608101845291825287855260d88452919093208054919392830191869081106129d9576129d9613827565b60009182526020808320600292830201546001600160a01b0316845242938101939093528454600181810187559583529290912083519290910201805492939092839160ff1990911690836003811115612a3557612a3561321d565b0217905550602082015181546001600160a01b0390911661010002610100600160a81b03199091161781556040918201516001909101555160008051602061437883398151915290610e45908590600290613a55565b60ce8160088110612a9b57600080fd5b0154905081565b6097546001600160a01b031633146117d05760405162461bcd60e51b8152600401610c5090614180565b600080516020614358833981519152546001600160a01b031690565b610f17612aa2565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612b2357611ef583612d6a565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612b7d575060408051601f3d908101601f19168201909252612b7a91810190613f4c565b60015b612b995760405162461bcd60e51b8152600401610c50906141db565b6000805160206143588339815191528114612bc65760405162461bcd60e51b8152600401610c5090614231565b50611ef5838383612dbe565b6001600160a01b03163b151590565b600054610100900460ff16612c085760405162461bcd60e51b8152600401610c5090614289565b6117d0612de9565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606081600003612c895750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612cb35780612c9d81613753565b9150612cac9050600a83614299565b9150612c8d565b6000816001600160401b03811115612ccd57612ccd6130aa565b6040519080825280601f01601f191660200182016040528015612cf7576020820181803683370190505b5090505b8415612d6257612d0c600183613de6565b9150612d19600a86613d8e565b612d24906030613d21565b60f81b818381518110612d3957612d39613827565b60200101906001600160f81b031916908160001a905350612d5b600a86614299565b9450612cfb565b949350505050565b612d7381612bd2565b612d8f5760405162461bcd60e51b8152600401610c50906142f7565b60008051602061435883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612dc783612e19565b600082511180612dd45750805b15611ef557612de38383612e59565b50505050565b600054610100900460ff16612e105760405162461bcd60e51b8152600401610c5090614289565b6117d033612c10565b612e2281612d6a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060612e7e838360405180606001604052806027815260200161439860279139612e85565b9392505050565b6060600080856001600160a01b031685604051612ea29190614307565b600060405180830381855af49150503d8060008114612edd576040519150601f19603f3d011682016040523d82523d6000602084013e612ee2565b606091505b5091509150612ef386838387612efd565b9695505050505050565b60608315612f3a578251600003612f3357612f1785612bd2565b612f335760405162461bcd60e51b8152600401610c5090614347565b5081612d62565b612d628383815115612f4f5781518083602001fd5b8060405162461bcd60e51b8152600401610c5091906132e7565b828054612f75906137bf565b90600052602060002090601f016020900481019282612f975760008555612fdd565b82601f10612fb057805160ff1916838001178555612fdd565b82800160010185558215612fdd579182015b82811115612fdd578251825591602001919060010190612fc2565b5061197f929150613073565b828054828255906000526020600020908101928215612fdd579160200282015b82811115612fdd578235825591602001919060010190613009565b6040805160608101909152806000815260006020820181905260409091015290565b8260088101928215612fdd5791602002820182811115612fdd578251825591602001919060010190612fc2565b5b8082111561197f5760008155600101613074565b805b8114610f1757600080fd5b80356121fb81613088565b601f01601f191690565b634e487b7160e01b600052604160045260246000fd5b6130c9826130a0565b81018181106001600160401b03821117156130e6576130e66130aa565b6040525050565b60006130f860405190565b905061310482826130c0565b919050565b60006001600160401b03821115613122576131226130aa565b61312b826130a0565b60200192915050565b82818337506000910152565b600061315361314e84613109565b6130ed565b90508281526020810184848401111561316e5761316e600080fd5b613179848285613134565b509392505050565b600082601f83011261319557613195600080fd5b8135612d62848260208601613140565b600080604083850312156131bb576131bb600080fd5b60006131c78585613095565b92505060208301356001600160401b038111156131e6576131e6600080fd5b6131f285828601613181565b9150509250929050565b60006020828403121561321157613211600080fd5b6000612d628484613095565b634e487b7160e01b600052602160045260246000fd5b60038110610f1757610f1761321d565b8061310481613233565b60006121fb82613243565b6132618161324d565b82525050565b60005b8381101561328257818101518382015260200161326a565b83811115612de35750506000910152565b600061329d825190565b8084526020840193506132b4818560208601613267565b6132bd816130a0565b9093019392505050565b604081016132d58285613258565b8181036020830152612d628184613293565b60208082528101612e7e8184613293565b6000806040838503121561330e5761330e600080fd5b600061331a8585613095565b92505060206131f285828601613095565b60006001600160a01b0382166121fb565b6132618161332b565b80613261565b60408101613359828561333c565b612e7e6020830184613345565b61308a8161332b565b80356121fb81613366565b60008060006060848603121561339257613392600080fd5b600061339e8686613095565b93505060206133af8682870161336f565b92505060406133c086828701613095565b9150509250925092565b602081016121fb8284613345565b60008083601f8401126133ed576133ed600080fd5b5081356001600160401b0381111561340757613407600080fd5b60208301915083602082028301111561342257613422600080fd5b9250929050565b6000806020838503121561343f5761343f600080fd5b82356001600160401b0381111561345857613458600080fd5b613464858286016133d8565b92509250509250929050565b60006020828403121561348557613485600080fd5b6000612d62848461336f565b600080600080600060a086880312156134ac576134ac600080fd5b85356001600160401b038111156134c5576134c5600080fd5b6134d188828901613181565b95505060208601356001600160401b038111156134f0576134f0600080fd5b6134fc88828901613181565b94505060408601356001600160401b0381111561351b5761351b600080fd5b61352788828901613181565b93505060608601356001600160401b0381111561354657613546600080fd5b61355288828901613181565b92505060808601356001600160401b0381111561357157613571600080fd5b61357d88828901613181565b9150509295509295909350565b600080604083850312156135a0576135a0600080fd5b60006131c7858561336f565b600080604083850312156135c2576135c2600080fd5b600061331a858561336f565b60048110610f1757610f1761321d565b80613104816135ce565b60006121fb826135de565b613261816135e8565b6060810161360a82866135f3565b613617602083018561333c565b612d626040830184613345565b8051606083019061363584826135f3565b506020820151613648602085018261333c565b506040820151612de36040850182613345565b606081016121fb8284613624565b602081016121fb828461333c565b602081016121fb8284613258565b60006001600160401b0382111561369e5761369e6130aa565b5060200290565b60006136b361314e84613685565b905080602084028301858111156136cc576136cc600080fd5b835b818110156136f057806136e18882613095565b845250602092830192016136ce565b5050509392505050565b600082601f83011261370e5761370e600080fd5b6008612d628482856136a5565b6000610100828403121561373157613731600080fd5b6000612d6284846136fa565b634e487b7160e01b600052601160045260246000fd5b600060001982036137665761376661373d565b5060010190565b60088110610f1757610f1761321d565b806131048161376d565b60006121fb8261377d565b61326181613787565b604081016133598285613792565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806137d357607f821691505b6020821081036137e5576137e56137a9565b50919050565b6012815260006020820171496e646578206f7574206f662072616e676560701b815291505b5060200190565b602080825281016121fb816137eb565b634e487b7160e01b600052603260045260246000fd5b81835260006020840193506001600160fb1b0383111561385f5761385f600080fd5b602083029250613870838584613134565b50500190565b60208082528101612d6281848661383d565b602c81526000602082017f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682081526b19195b1959d85d1958d85b1b60a21b602082015291505b5060400190565b602080825281016121fb81613888565b602c81526000602082017f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682081526b6163746976652070726f787960a01b602082015291506138cd565b602080825281016121fb816138e4565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b602082015291506138cd565b602080825281016121fb8161393d565b60006121fb826139a6565b90565b60ff1690565b61326181613998565b602081016121fb82846139ac565b80516121fb81613366565b6000602082840312156139e3576139e3600080fd5b6000612d6284846139c3565b600a81526000602082016927b7363c9037bbb732b960b11b81529150613810565b602080825281016121fb816139ef565b600e81526000602082016d20b73a32b737309034b99037b33360911b81529150613810565b602080825281016121fb81613a20565b60408101613a638285613345565b612e7e60208301846135f3565b603881526000602082017f555550535570677261646561626c653a206d757374206e6f742062652063616c8152771b1959081d1a1c9bdd59da0819195b1959d85d1958d85b1b60421b602082015291506138cd565b602080825281016121fb81613a70565b60006121fb6139a38381565b61326181613ad5565b602081016121fb8284613ae1565b6000613b0661314e84613109565b905082815260208101848484011115613b2157613b21600080fd5b613179848285613267565b600082601f830112613b4057613b40600080fd5b8151612d62848260208601613af8565b600060208284031215613b6557613b65600080fd5b81516001600160401b03811115613b7e57613b7e600080fd5b612d6284828501613b2c565b6000613b94825190565b613ba2818560208601613267565b9290920192915050565b7f6c6574206578747261466f6e74203d206040666f6e742d66616365207b666f6e81527f742d66616d696c793a274d617468636173746c657352656d69782d457874726160208201527f273b666f6e742d646973706c61793a626c6f636b3b7372633a75726c2864617460408201527f613a6170706c69636174696f6e2f666f6e742d776f6666323b6368617273657460608201526d0f5d5d198b4e0ed8985cd94d8d0b60921b6080820152608e016000613c678284613b8a565b7f2920666f726d61742827776f666627293b7d603b20646f63756d656e742e686581527f61642e696e7365727441646a6163656e7448544d4c28276265666f7265656e6460208201527f272c20273c7374796c653e272b6578747261466f6e742b273c2f7374796c653e60408201526227293b60e81b6060820152915060638201612e7e565b80151561308a565b80516121fb81613ced565b600060208284031215613d1557613d15600080fd5b6000612d628484613cf5565b60008219821115613d3457613d3461373d565b500190565b60188152600060208201774e6f20616e74656e6e61206d6f64696669636174696f6e7360401b81529150613810565b602080825281016121fb81613d39565b634e487b7160e01b600052601260045260246000fd5b600082613d9d57613d9d613d78565b500690565b601e81526000602082017f4e6f2061637469766520736174656c6c6974652062726f61646361737473000081529150613810565b602080825281016121fb81613da2565b600082821015613df857613df861373d565b500390565b696c6574204154494d453d60b01b8152600a016000613e1c8285613b8a565b693b6c65742054494d453d60b01b8152600a019150613e3b8284613b8a565b603b60f81b8152600101949350505050565b600d81526000602082016c4e6f2062726f6164636173747360981b81529150613810565b602080825281016121fb81613e4d565b634e487b7160e01b600052603160045260246000fd5b60058110610f1757600080fd5b80516121fb81613e97565b600060208284031215613ec457613ec4600080fd5b6000612d628484613ea4565b601181526000602082017021b0b73737ba103132903a32b93930b4b760791b81529150613810565b602080825281016121fb81613ed0565b601281526000602082017120b73a32b737309030b63932b0b23c9037b760711b81529150613810565b602080825281016121fb81613f08565b80516121fb81613088565b600060208284031215613f6157613f61600080fd5b6000612d628484613f41565b60008154613f7a816137bf565b600182168015613f915760018114613fa257613fd2565b60ff19831686528186019350613fd2565b60008581526020902060005b83811015613fca57815488820152600190910190602001613fae565b838801955050505b50505092915050565b6000613fe7828a613b8a565b9150613ff38289613b8a565b9150613fff8288613f6d565b915061400b8287613f6d565b91506140178286613f6d565b91506140238285613f6d565b7f742e6d313d6469737428632c31352e352c722c63292b616972736869702a2e3081526c352a534545442a2e303030343560981b6020820152602d01915061406b8284613f6d565b9998505050505050505050565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506138cd565b602080825281016121fb81614078565b600c81526000602082016b4f7574206f662072616e676560a01b81529150613810565b602080825281016121fb816140cb565b602381526000602082017f416c726561647920636f6e6e656374656420746f207468697320736174656c6c81526269746560e81b602082015291506138cd565b602080825281016121fb816140fe565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000613810565b602080825281016121fb8161414e565b602e81526000602082017f45524331393637557067726164653a206e657720696d706c656d656e7461746981526d6f6e206973206e6f74205555505360901b602082015291506138cd565b602080825281016121fb81614190565b602981526000602082017f45524331393637557067726164653a20756e737570706f727465642070726f788152681a58589b195555525160ba1b602082015291506138cd565b602080825281016121fb816141eb565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b602082015291506138cd565b602080825281016121fb81614241565b6000826142a8576142a8613d78565b500490565b602d81526000602082017f455243313936373a206e657720696d706c656d656e746174696f6e206973206e81526c1bdd08184818dbdb9d1c9858dd609a1b602082015291506138cd565b602080825281016121fb816142ad565b6000612e7e8284613b8a565b601d81526000602082017f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081529150613810565b602080825281016121fb8161431356fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcb88b664350bc9ddbc50531dce3d6e62e2d80bca05f7b5a685f70fae05cae84a3416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564423340aa7c0e020e972e8a68cbb56a1ae8f607fce720bfd560468384b6054193a26469706673582212204263590caa80662b1dfae6a82dd55ba688cee1dc94ab9c7de71b54034104aa8764736f6c634300080d0033
Verified Source Code Full Match
Compiler: v0.8.13+commit.abaa5c0e
EVM: london
Types.sol 59 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
enum AntennaStatus {
Off,
On,
ConnectedToSatellite
}
enum AntennaModification {
TurnedAntennaOff,
TurnedAntennaOn,
TunedToCapturedSatelliteConnection,
CapturedSatelliteConnection
}
enum Activation {
Cascade,
Plague
}
enum Status {
Terrain,
Daydream,
Terraformed,
OriginDaydream,
OriginTerraformed
}
struct SVGParams {
uint256[32][32] heightmapIndices;
uint256 level;
uint256 tile;
uint256 resourceLvl;
uint256 resourceDirection;
uint256 status;
uint256 font;
uint256 fontSize;
uint256 biome;
int attunement;
AntennaStatus antenna;
string zoneName;
string script;
string[9] chars;
string[10] zoneColors;
}
struct AnimParams {
Activation activation; // Token's animation type
uint256 classesAnimated; // Classes animated
uint256 duration; // Base animation duration for first class
uint256 durationInc; // Duration increment for each class
uint256 delay; // Base delay for first class
uint256 delayInc; // Delay increment for each class
uint256 bgDuration; // Animation duration for background
uint256 bgDelay; // Delay for background
string easing; // Animation mode, e.g. steps(), linear, ease-in-out
string[2] altColors;
}
ToString.sol 35 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library ToString {
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT license
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
function toString(int256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT license
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value < 0) {
return string.concat("-", toString(uint256(-value)));
}
return toString(uint256(value));
}
}
IBeacon.sol 20 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {AntennaStatus} from "../lib/Types.sol";
interface IBeacon {
function getParcelCode(
uint256
) external view returns (AntennaStatus, string memory);
function getParcelCodeFromPlacement(
uint256
) external view returns (AntennaStatus, string memory);
function scriptFonts(uint) external view returns (string memory);
function scriptLibraries(uint) external view returns (string memory);
function scriptBodies(uint) external view returns (string memory);
function scriptLoopStarts(uint) external view returns (string memory);
function scriptLoopEnds(uint) external view returns (string memory);
}
TerraformsBeacon_v2_0.sol 622 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {IBeacon} from "./interfaces/IBeacon.sol";
import {ITerraforms, Status} from "./interfaces/ITerraforms.sol";
import {ITerraformsCharacters} from "./interfaces/ITerraformsCharacters.sol";
import {ISatellite} from "./interfaces/ISatellite.sol";
import {AntennaStatus, AntennaModification} from "./lib/Types.sol";
import {ToString} from "./lib/ToString.sol";
/// @author xaltgeist, with code direction and consultation from 113
/// @title A beacon for Terraforms parcels, version 2.0
contract TerraformsBeacon_v2_0 is
IBeacon,
Initializable,
UUPSUpgradeable,
OwnableUpgradeable
{
using ToString for uint256;
enum ScriptComponent {
Library,
Font,
Extra1,
Body,
UI,
Extra2,
LoopStart,
LoopEnd
}
struct Broadcast {
address satellite;
uint256 duration;
}
struct CapturedSatelliteConnection {
address satellite;
uint256 timestamp;
}
struct AntennaModificationRecord {
AntennaModification modification;
address satellite;
uint256 timestamp;
}
// Contract data
string public version;
uint256 public MAX_SUPPLY;
ITerraforms terraforms;
// Broadcast data
Broadcast[] public broadcasts;
uint256[] public broadcastOrder;
uint256[8] public defaultScriptComponentIndices;
// Parcel data
mapping(uint256 => uint256) public placementToParcelId;
mapping(uint256 => AntennaStatus) public parcelToAntennaStatus;
mapping(uint256 => CapturedSatelliteConnection[])
public parcelToCapturedSatelliteConnections;
mapping(uint256 => uint256) public parcelToActiveSatelliteConnectionIndex;
mapping(uint256 => AntennaModificationRecord[]) public parcelToAntennaMods;
// Script data
mapping(uint256 => string) public scriptLibraries;
mapping(uint256 => string) public scriptFonts;
mapping(uint256 => string) public scriptExtras1;
mapping(uint256 => string) public scriptBodies;
mapping(uint256 => string) public scriptUIs;
mapping(uint256 => string) public scriptExtras2;
mapping(uint256 => string) public scriptLoopStarts;
mapping(uint256 => string) public scriptLoopEnds;
uint public nScriptLibraries;
uint public nScriptFonts;
uint public nScriptExtras1;
uint public nScriptBodies;
uint public nScriptUIs;
uint public nScriptExtras2;
uint public nScriptLoopStarts;
uint public nScriptLoopEnds;
// Events
event ParcelModified(uint256 tokenId, AntennaModification modification);
event BroadcastAdded(address satellite, uint256 duration);
event BroadcastRemoved(address satellite);
event BroadcastModified(address satellite, uint256 duration);
event BroadcastOrderModified(uint256[] order);
event ScriptComponentModified(ScriptComponent componentType, uint256 index);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* INITIALIZER
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize(
string memory _scriptLibrary,
string memory _scriptBody,
string memory _scriptUI,
string memory _scriptLoopStart,
string memory _scriptLoopEnd
) public initializer {
__Ownable_init();
version = "Version 2.0";
terraforms = ITerraforms(0x4E1f41613c9084FdB9E34E11fAE9412427480e56); // Main (ERC721) contract
MAX_SUPPLY = 11104;
setScriptLibrary(0, _scriptLibrary);
setScriptBody(0, _scriptBody);
setScriptUI(0, _scriptUI);
setScriptLoopStart(0, _scriptLoopStart);
setScriptLoopEnd(0, _scriptLoopEnd);
}
function _authorizeUpgrade(
address newImplementation
) internal override onlyOwner {}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* PUBLIC: WRITE FUNCTIONS
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/// @notice Turns the antenna on for a parcel
/// @param tokenId The parcel's token ID
function turnAntennaOn(uint256 tokenId) public {
require(terraforms.ownerOf(tokenId) == msg.sender, "Only owner");
require(
terraforms.tokenToStatus(tokenId) != Status.Terrain,
"Cannot be terrain"
);
require(
parcelToAntennaStatus[tokenId] != AntennaStatus.On,
"Antenna already on"
);
if (parcelToAntennaMods[tokenId].length == 0) {
placementToParcelId[terraforms.tokenToPlacement(tokenId)] = tokenId;
}
parcelToAntennaStatus[tokenId] = AntennaStatus.On;
parcelToAntennaMods[tokenId].push(
AntennaModificationRecord(
AntennaModification.TurnedAntennaOn,
address(0),
block.timestamp
)
);
emit ParcelModified(tokenId, AntennaModification.TurnedAntennaOn);
}
/// @notice Turns the antenna off for a parcel
/// @param tokenId The parcel's token ID
function turnAntennaOff(uint256 tokenId) public {
require(terraforms.ownerOf(tokenId) == msg.sender, "Only owner");
require(
parcelToAntennaStatus[tokenId] != AntennaStatus.Off,
"Antenna is off"
);
parcelToAntennaStatus[tokenId] = AntennaStatus.Off;
parcelToAntennaMods[tokenId].push(
AntennaModificationRecord(
AntennaModification.TurnedAntennaOff,
address(0),
block.timestamp
)
);
emit ParcelModified(tokenId, AntennaModification.TurnedAntennaOff);
}
/// @notice Saves a connection to the current satellite
/// @param tokenId The parcel's token ID
function saveConnectionToCurrentSatellite(uint256 tokenId) public {
require(terraforms.ownerOf(tokenId) == msg.sender, "Only owner");
require(
parcelToAntennaStatus[tokenId] != AntennaStatus.Off,
"Antenna is off"
);
int256 index = getCurrentBroadcastIndex();
require(index >= 0, "No active satellite broadcasts");
Broadcast memory b = broadcasts[uint256(index)];
ISatellite(b.satellite).capture(tokenId);
parcelToCapturedSatelliteConnections[tokenId].push(
CapturedSatelliteConnection(b.satellite, block.timestamp)
);
parcelToAntennaMods[tokenId].push(
AntennaModificationRecord(
AntennaModification.CapturedSatelliteConnection,
b.satellite,
block.timestamp
)
);
emit ParcelModified(
tokenId,
AntennaModification.TunedToCapturedSatelliteConnection
);
tuneToCapturedSatelliteConnection(
tokenId,
parcelToCapturedSatelliteConnections[tokenId].length - 1
);
}
/// @notice Tunes a parcel's antenna to a captured broadcast
/// @param tokenId The parcel's token ID
/// @param index The index of the captured broadcast to tune to
function tuneToCapturedSatelliteConnection(
uint256 tokenId,
uint256 index
) public {
require(
parcelToAntennaStatus[tokenId] != AntennaStatus.Off,
"Antenna is off"
);
require(terraforms.ownerOf(tokenId) == msg.sender, "Only owner");
require(
index < parcelToCapturedSatelliteConnections[tokenId].length,
"Out of range"
);
AntennaModificationRecord memory lastMod = getLastAntennaModification(
tokenId
);
if (
lastMod.modification ==
AntennaModification.TunedToCapturedSatelliteConnection
) {
require(
lastMod.satellite !=
parcelToCapturedSatelliteConnections[tokenId][index]
.satellite,
"Already connected to this satellite"
);
}
parcelToActiveSatelliteConnectionIndex[tokenId] = index;
parcelToAntennaStatus[tokenId] = AntennaStatus.ConnectedToSatellite;
parcelToAntennaMods[tokenId].push(
AntennaModificationRecord(
AntennaModification.TunedToCapturedSatelliteConnection,
parcelToCapturedSatelliteConnections[tokenId][index].satellite,
block.timestamp
)
);
emit ParcelModified(
tokenId,
AntennaModification.TunedToCapturedSatelliteConnection
);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* PUBLIC: READ FUNCTIONS
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/// @notice Gets the status of a parcel's antenna
/// @param tokenId The parcel's token ID
/// @return status The status of the parcel's antenna
function getAntennaStatus(
uint256 tokenId
) public view returns (AntennaStatus status) {
require(tokenId <= MAX_SUPPLY);
return parcelToAntennaStatus[tokenId];
}
/// @notice Gets the first antenna modification for a parcel
/// @param tokenId The parcel's token ID
/// @return modification The first antenna modification
function getFirstAntennaModification(
uint256 tokenId
) public view returns (AntennaModificationRecord memory) {
AntennaModificationRecord[] storage mods = parcelToAntennaMods[tokenId];
require(mods.length > 0, "No antenna modifications");
return mods[0];
}
/// @notice Gets the last antenna modification for a parcel
/// @param tokenId The parcel's token ID
/// @return modification The last antenna modification
function getLastAntennaModification(
uint256 tokenId
) public view returns (AntennaModificationRecord memory) {
AntennaModificationRecord[] storage mods = parcelToAntennaMods[tokenId];
require(mods.length > 0, "No antenna modifications");
return mods[mods.length - 1];
}
/// @notice Gets the antenna modification at a given index for a parcel
/// @param tokenId The parcel's token ID
/// @param index The index of the antenna modification
/// @return modification The antenna modification
function getAntennaModificationAtIndex(
uint256 tokenId,
uint256 index
) public view returns (AntennaModificationRecord memory) {
AntennaModificationRecord[] storage mods = parcelToAntennaMods[tokenId];
require(index < mods.length, "Index out of range");
return mods[index];
}
/// @notice Gets the number of antenna modifications for a parcel
/// @param tokenId The parcel's token ID
/// @return The number of antenna modifications
function getNumberOfAntennaModifications(
uint256 tokenId
) public view returns (uint256) {
AntennaModificationRecord[] storage mods = parcelToAntennaMods[tokenId];
return mods.length;
}
/// @notice Gets the index of the current broadcast
/// @return index The index of the current broadcast
function getCurrentBroadcastIndex() public view returns (int256 index) {
uint256 cycleDuration = getBroadcastCycleDuration();
if (cycleDuration == 0) {
return -1;
}
uint256 locationInCycle = block.timestamp % cycleDuration;
uint256 aggregator;
Broadcast memory b;
for (uint256 i; i < broadcastOrder.length; i++) {
if (broadcastOrder[i] < broadcasts.length) {
b = broadcasts[broadcastOrder[i]];
if (ISatellite(b.satellite).isBroadcasting()) {
aggregator += broadcasts[broadcastOrder[i]].duration;
}
if (locationInCycle < aggregator) {
return int256(broadcastOrder[i]);
}
}
}
return -1;
}
/// @notice Gets the duration of the current cycle
/// @return result The duration of the current cycle
function getBroadcastCycleDuration() public view returns (uint256 result) {
for (uint256 i; i < broadcastOrder.length; i++) {
if (
broadcastOrder[i] < broadcasts.length &&
ISatellite(broadcasts[broadcastOrder[i]].satellite)
.isBroadcasting()
) {
result += broadcasts[broadcastOrder[i]].duration;
}
}
}
/// @notice Gets the default script
/// @return script The default script (a JavaScript string)
function getCoreScript(uint tokenId) public view returns (string memory) {
return
string.concat(
assembleScriptVars(tokenId),
getFont(defaultScriptComponentIndices[0]),
scriptLibraries[defaultScriptComponentIndices[1]],
scriptBodies[defaultScriptComponentIndices[2]],
scriptUIs[defaultScriptComponentIndices[3]],
scriptLoopStarts[defaultScriptComponentIndices[3]],
"t.m1=dist(c,15.5,r,c)+airship*.05*SEED*.00045",
scriptLoopEnds[defaultScriptComponentIndices[4]]
);
}
/// @notice Gets the code for a parcel
/// @param tokenId The parcel's token ID
/// @return status The status of the parcel's antenna
/// @return parcelCode The code for the parcel (a JavaScript string)
function getParcelCode(
uint256 tokenId
) public view returns (AntennaStatus status, string memory parcelCode) {
status = parcelToAntennaStatus[tokenId];
int256 index = getCurrentBroadcastIndex();
if (status == AntennaStatus.Off) {
parcelCode = getCoreScript(tokenId);
} else if (status == AntennaStatus.ConnectedToSatellite) {
CapturedSatelliteConnection
memory c = parcelToCapturedSatelliteConnections[tokenId][
parcelToActiveSatelliteConnectionIndex[tokenId]
];
parcelCode = ISatellite(c.satellite).getBroadcast(tokenId);
} else if (index >= 0) {
parcelCode = ISatellite(broadcasts[uint256(index)].satellite)
.getBroadcast(tokenId);
} else {
parcelCode = getCoreScript(tokenId);
}
}
/// @notice Gets the script for a parcel's placement
/// @param placement The parcel's placement
/// @return status The status of the parcel's antenna
/// @return script The script for the parcel (a JavaScript string)
function getParcelCodeFromPlacement(
uint256 placement
) public view returns (AntennaStatus status, string memory script) {
return getParcelCode(placementToParcelId[placement]);
}
function assembleScriptVars(
uint tokenId
) public view returns (string memory vars) {
uint atime;
if (getNumberOfAntennaModifications(tokenId) > 0) {
atime = getFirstAntennaModification(tokenId).timestamp;
}
return
string.concat(
"let ATIME=",
atime.toString(),
";let TIME=",
uint(block.timestamp).toString(),
";"
);
}
/// @notice Gets the font for a parcel
/// @param index The index of the font
/// @return font The font for the parcel (wrapped base64 string)
function getFont(uint256 index) public view returns (string memory font) {
font = scriptFonts[index];
if (keccak256(bytes(font)) == keccak256(bytes(""))) {
font = ITerraformsCharacters(
0xC9e417B7e67E387026161E50875D512f29630D7B
).font(0);
}
return
string.concat(
"let extraFont = `@font-face {font-family:'MathcastlesRemix-Extra';font-display:block;src:url(data:application/font-woff2;charset=utf-8;base64,",
font,
") format('woff');}`; document.head.insertAdjacentHTML('beforeend', '<style>'+extraFont+'</style>');"
);
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* PUBLIC: ADMINISTRATIVE
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/// @notice Adds a broadcast to the list of broadcasts
/// @param satellite The satellite contract address
/// @param duration The duration of the broadcast
function addBroadcast(
address satellite,
uint256 duration
) public onlyOwner {
broadcasts.push(Broadcast(satellite, duration));
emit BroadcastAdded(satellite, duration);
}
/// @notice Removes the last broadcast from the list of broadcasts
function removeLastBroadcast() public onlyOwner {
require(broadcasts.length > 0, "No broadcasts");
Broadcast memory b = broadcasts[broadcasts.length - 1];
broadcasts.pop();
emit BroadcastRemoved(b.satellite);
}
/// @notice Modifies a broadcast
/// @param index The index of the broadcast to modify
/// @param satellite The satellite contract address
/// @param duration The duration of the broadcast
function modifyBroadcast(
uint256 index,
address satellite,
uint256 duration
) public onlyOwner {
require(index < broadcasts.length, "Index out of range");
Broadcast storage b = broadcasts[index];
if (b.duration != duration) {
b.duration = duration;
}
if (b.satellite != satellite) {
b.satellite = satellite;
}
emit BroadcastModified(b.satellite, b.duration);
}
/// @notice Modifies the broadcast order
/// @param order The new broadcast order
function modifyBroadcastOrder(uint256[] calldata order) public onlyOwner {
uint256 nBroadcasts = broadcasts.length;
for (uint256 i; i < order.length; i++) {
require(order[i] < nBroadcasts, "Index out of range");
}
broadcastOrder = order;
emit BroadcastOrderModified(order);
}
/// @notice Sets a script library component
/// @param index The index of the script library component
/// @param scriptLibrary The script library component
function setScriptLibrary(
uint index,
string memory scriptLibrary
) public onlyOwner {
if (index == nScriptLibraries) {
nScriptLibraries++;
}
scriptLibraries[index] = scriptLibrary;
emit ScriptComponentModified(ScriptComponent.Library, index);
}
/// @notice Sets a script font component
/// @param index The index of the script font component
/// @param scriptFont The script font component
function setScriptFont(
uint index,
string memory scriptFont
) public onlyOwner {
if (index == nScriptFonts) {
nScriptFonts++;
}
scriptFonts[index] = scriptFont;
emit ScriptComponentModified(ScriptComponent.Font, index);
}
/// @notice Sets a script extra1 component
/// @param index The index of the script extra1 component
/// @param scriptExtra1 The script extra1 component
function setScriptExtra1(
uint index,
string memory scriptExtra1
) public onlyOwner {
if (index == nScriptExtras1) {
nScriptExtras1++;
}
scriptExtras1[index] = scriptExtra1;
emit ScriptComponentModified(ScriptComponent.Extra1, index);
}
/// @notice Sets a script body component
/// @param index The index of the script body component
/// @param scriptBody The script body component
function setScriptBody(
uint index,
string memory scriptBody
) public onlyOwner {
if (index == nScriptBodies) {
nScriptBodies++;
}
scriptBodies[index] = scriptBody;
emit ScriptComponentModified(ScriptComponent.Body, index);
}
/// @notice Sets a script UI component
/// @param index The index of the script UI component
/// @param scriptUI The script UI component
function setScriptUI(uint index, string memory scriptUI) public onlyOwner {
if (index == nScriptUIs) {
nScriptUIs++;
}
scriptUIs[index] = scriptUI;
emit ScriptComponentModified(ScriptComponent.UI, index);
}
/// @notice Sets a script extra2 component
/// @param index The index of the script extra2 component
/// @param scriptExtra2 The script extra2 component
function setScriptExtra2(
uint index,
string memory scriptExtra2
) public onlyOwner {
if (index == nScriptExtras2) {
nScriptExtras2++;
}
scriptExtras2[index] = scriptExtra2;
emit ScriptComponentModified(ScriptComponent.Extra2, index);
}
/// @notice Sets a script loop start component
/// @param index The index of the script loop start component
/// @param scriptLoopStart The script loop start component
function setScriptLoopStart(
uint index,
string memory scriptLoopStart
) public onlyOwner {
if (index == nScriptLoopStarts) {
nScriptLoopStarts++;
}
scriptLoopStarts[index] = scriptLoopStart;
emit ScriptComponentModified(ScriptComponent.LoopStart, index);
}
/// @notice Sets a script loop end component
/// @param index The index of the script loop end component
/// @param scriptLoopEnd The script loop end component
function setScriptLoopEnd(
uint index,
string memory scriptLoopEnd
) public onlyOwner {
if (index == nScriptLoopEnds) {
nScriptLoopEnds++;
}
scriptLoopEnds[index] = scriptLoopEnd;
emit ScriptComponentModified(ScriptComponent.LoopEnd, index);
}
/// @notice Sets the default script component indices
/// @param indices The default script component indices
/// @dev The indices are in the following order: library, font, extra1, body, UI, extra2, loopStart, loopEnd
function setDefaultScriptComponentIndices(
uint256[8] memory indices
) public onlyOwner {
defaultScriptComponentIndices = indices;
}
}
ISatellite.sol 10 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ISatellite {
function isBroadcasting() external view returns (bool);
function capture(uint256) external;
function getBroadcast(uint256) external view returns (string memory);
}
ITerraforms.sol 16 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Status} from "../lib/Types.sol";
interface ITerraforms {
function dreamers() external view returns (uint256);
function ownerOf(uint256) external view returns (address);
function tokenToDreamer(uint256) external view returns (address);
function tokenToPlacement(uint256) external view returns (uint256);
function tokenToStatus(uint256) external view returns (Status);
}
ITerraformsCharacters.sol 6 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ITerraformsCharacters {
function font(uint) external view returns (string memory);
}
AddressUpgradeable.sol 244 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
ContextUpgradeable.sol 41 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
OwnableUpgradeable.sol 95 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
Initializable.sol 166 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}
UUPSUpgradeable.sol 112 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import {Initializable} from "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*
* _Available since v4.1._
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
address private immutable __self = address(this);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
require(address(this) != __self, "Function must be called through delegatecall");
require(_getImplementation() == __self, "Function must be called through active proxy");
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
_;
}
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/**
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
return _IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeTo(address newImplementation) public virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data, true);
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeTo} and {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal override onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
StorageSlotUpgradeable.sol 138 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
* _Available since v4.9 for `string`, `bytes`._
*/
library StorageSlotUpgradeable {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}
IERC1967Upgradeable.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*
* _Available since v4.8.3._
*/
interface IERC1967Upgradeable {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}
IBeaconUpgradeable.sol 16 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeaconUpgradeable {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {BeaconProxy} will check that this address is a contract.
*/
function implementation() external view returns (address);
}
draft-IERC1822Upgradeable.sol 20 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822ProxiableUpgradeable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}
ERC1967UpgradeUpgradeable.sol 170 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/IERC1967Upgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import {Initializable} from "../utils/Initializable.sol";
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*
* _Available since v4.1._
*/
abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {
// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
function __ERC1967Upgrade_init() internal onlyInitializing {
}
function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
}
/**
* @dev Returns the current implementation address.
*/
function _getImplementation() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Perform implementation upgrade
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Perform implementation upgrade with additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {
_upgradeTo(newImplementation);
if (data.length > 0 || forceCall) {
AddressUpgradeable.functionDelegateCall(newImplementation, data);
}
}
/**
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {
// Upgrades from old implementations will perform a rollback test. This test requires the new
// implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
// this special case will break upgrade paths from old UUPS implementation to new ones.
if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
_setImplementation(newImplementation);
} else {
try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
} catch {
revert("ERC1967Upgrade: new implementation is not UUPS");
}
_upgradeToAndCall(newImplementation, data, forceCall);
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
require(newAdmin != address(0), "ERC1967: new admin is the zero address");
StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*/
function _changeAdmin(address newAdmin) internal {
emit AdminChanged(_getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
*/
bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function _getBeacon() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
require(
AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
"ERC1967: beacon implementation is not a contract"
);
StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
}
/**
* @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
* not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
*
* Emits a {BeaconUpgraded} event.
*/
function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0 || forceCall) {
AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
}
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
Read Contract
MAX_SUPPLY 0x32cb6b0c → uint256
assembleScriptVars 0xbd3f754e → string
broadcastOrder 0xc99874ce → uint256
broadcasts 0xe8532b5f → address, uint256
defaultScriptComponentIndices 0xfc2d95a1 → uint256
getAntennaModificationAtIndex 0xb2656c6c → tuple
getAntennaStatus 0xeb64be9e → uint8
getBroadcastCycleDuration 0x8a1b917c → uint256
getCoreScript 0xeb611ad0 → string
getCurrentBroadcastIndex 0x8eae6e4e → int256
getFirstAntennaModification 0x8c938119 → tuple
getFont 0x5dc44aed → string
getLastAntennaModification 0xa1511bb5 → tuple
getNumberOfAntennaModifications 0x1cdf6854 → uint256
getParcelCode 0x97eea508 → uint8, string
getParcelCodeFromPlacement 0x0516b07b → uint8, string
nScriptBodies 0x78785a1f → uint256
nScriptExtras1 0xeb6dba0f → uint256
nScriptExtras2 0xd1d7f60b → uint256
nScriptFonts 0x98fd8569 → uint256
nScriptLibraries 0xd3a04b2a → uint256
nScriptLoopEnds 0x9b3ffe35 → uint256
nScriptLoopStarts 0x73c4e138 → uint256
nScriptUIs 0xd6df3b1e → uint256
owner 0x8da5cb5b → address
parcelToActiveSatelliteConnectionIndex 0xb90dc5b7 → uint256
parcelToAntennaMods 0x62bfb598 → uint8, address, uint256
parcelToAntennaStatus 0xe2caa153 → uint8
parcelToCapturedSatelliteConnections 0x096eb0fb → address, uint256
placementToParcelId 0xbf0399c1 → uint256
proxiableUUID 0x52d1902d → bytes32
scriptBodies 0xb2eb4627 → string
scriptExtras1 0xa9301760 → string
scriptExtras2 0x324219c8 → string
scriptFonts 0x42f91f3f → string
scriptLibraries 0x16f3383e → string
scriptLoopEnds 0x5fcc3ede → string
scriptLoopStarts 0x07185e7c → string
scriptUIs 0x5148a657 → string
version 0x54fd4d50 → string
Write Contract 22 functions
These functions modify contract state and require a wallet transaction to execute.
addBroadcast 0x4fc83a60
address satellite
uint256 duration
initialize 0x3cf4ba51
string _scriptLibrary
string _scriptBody
string _scriptUI
string _scriptLoopStart
string _scriptLoopEnd
modifyBroadcast 0x12c317d8
uint256 index
address satellite
uint256 duration
modifyBroadcastOrder 0x35edf06a
uint256[] order
removeLastBroadcast 0xc7f5ef29
No parameters
renounceOwnership 0x715018a6
No parameters
saveConnectionToCurrentSatellite 0x93be0485
uint256 tokenId
setDefaultScriptComponentIndices 0xebf7b177
uint256[8] indices
setScriptBody 0xdf65da8d
uint256 index
string scriptBody
setScriptExtra1 0x025d7dc8
uint256 index
string scriptExtra1
setScriptExtra2 0x21b80f7e
uint256 index
string scriptExtra2
setScriptFont 0x4a4564d1
uint256 index
string scriptFont
setScriptLibrary 0x43af2c48
uint256 index
string scriptLibrary
setScriptLoopEnd 0x88a5123e
uint256 index
string scriptLoopEnd
setScriptLoopStart 0x38fe2e7f
uint256 index
string scriptLoopStart
setScriptUI 0x3e52b1cd
uint256 index
string scriptUI
transferOwnership 0xf2fde38b
address newOwner
tuneToCapturedSatelliteConnection 0xfa3b19e3
uint256 tokenId
uint256 index
turnAntennaOff 0x5002104b
uint256 tokenId
turnAntennaOn 0xe53959e7
uint256 tokenId
upgradeTo 0x3659cfe6
address newImplementation
upgradeToAndCall 0x4f1ef286
address newImplementation
bytes data
Recent Transactions
No transactions found for this address