Forkchoice Ethereum Mainnet

Address Contract Verified

Address 0xcbc4619232Ab161AA3AF775DDee8e7497be4f148
Balance 0 ETH
Nonce 1
Code Size 16435 bytes
Indexed Transactions 0 (1 on-chain, 1.0% indexed)
External Etherscan · Sourcify

Contract Bytecode

16435 bytes
0x60806040526004361061026a575f3560e01c806379cc679011610143578063a9059cbb116100b5578063e2a972d911610079578063e2a972d9146109c2578063e5442026146109ea578063ead93c8f14610a12578063f103b43314610a3c578063f2fde38b14610a64578063f38a696d14610a8c576102b3565b8063a9059cbb146108bc578063ca654097146108f8578063d58a848314610934578063d5abeb011461095c578063dd62ed3e14610986576102b3565b806393c87f031161010757806393c87f03146107b457806395d89b41146107ca578063990edf0e146107f4578063998cdf83146108305780639e4fd60614610858578063a48af54f14610880576102b3565b806379cc6790146106d257806382b12dd7146106fa5780638da5cb5b1461072457806391dae5191461074e5780639358928b1461078a576102b3565b8063349f0b90116101dc578063619f446b116101a0578063619f446b146105b657806368573107146105de5780636c30aaa21461060657806370a0823114610642578063715018a61461067e578063726f16d814610694576102b3565b8063349f0b90146104d657806340c10f191461050057806342966c681461052857806344e181aa14610550578063590665c21461058c576102b3565b80632165cbb71161022e5780632165cbb7146103da57806323b872dd14610408578063279b6d3114610444578063313ce5671461046c57806332252057146104965780633403c2fc146104c0576102b3565b806306fdde03146102fa578063095ea7b3146103245780630cde821c1461036057806318160ddd146103885780631962699f146103b2576102b3565b366102b3575f34116102b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a890612e07565b60405180910390fd5b005b3480156102be575f5ffd5b506040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f190612e95565b60405180910390fd5b348015610305575f5ffd5b5061030e610ab6565b60405161031b9190612f13565b60405180910390f35b34801561032f575f5ffd5b5061034a60048036038101906103459190612fd1565b610b46565b6040516103579190613029565b60405180910390f35b34801561036b575f5ffd5b5061038660048036038101906103819190613042565b610b68565b005b348015610393575f5ffd5b5061039c610c77565b6040516103a9919061307c565b60405180910390f35b3480156103bd575f5ffd5b506103d860048036038101906103d39190612fd1565b610c85565b005b3480156103e5575f5ffd5b506103ee610d0c565b6040516103ff95949392919061315b565b60405180910390f35b348015610413575f5ffd5b5061042e600480360381019061042991906131b3565b610db0565b60405161043b9190613029565b60405180910390f35b34801561044f575f5ffd5b5061046a60048036038101906104659190613203565b610dde565b005b348015610477575f5ffd5b50610480610f5f565b60405161048d9190613249565b60405180910390f35b3480156104a1575f5ffd5b506104aa610f67565b6040516104b7919061307c565b60405180910390f35b3480156104cb575f5ffd5b506104d4610f73565b005b3480156104e1575f5ffd5b506104ea610fce565b6040516104f7919061307c565b60405180910390f35b34801561050b575f5ffd5b5061052660048036038101906105219190612fd1565b610fe9565b005b348015610533575f5ffd5b5061054e60048036038101906105499190613203565b61113e565b005b34801561055b575f5ffd5b5061057660048036038101906105719190613042565b611152565b604051610583919061307c565b60405180910390f35b348015610597575f5ffd5b506105a0611167565b6040516105ad9190613262565b60405180910390f35b3480156105c1575f5ffd5b506105dc60048036038101906105d79190613306565b61118c565b005b3480156105e9575f5ffd5b5061060460048036038101906105ff919061340d565b61120b565b005b348015610611575f5ffd5b5061062c600480360381019061062791906135b3565b6114c9565b6040516106399190613029565b60405180910390f35b34801561064d575f5ffd5b5061066860048036038101906106639190613042565b6114fe565b604051610675919061307c565b60405180910390f35b348015610689575f5ffd5b50610692611543565b005b34801561069f575f5ffd5b506106ba60048036038101906106b59190613203565b611556565b6040516106c9939291906135fa565b60405180910390f35b3480156106dd575f5ffd5b506106f860048036038101906106f39190612fd1565b6115a8565b005b348015610705575f5ffd5b5061070e6115c8565b60405161071b919061307c565b60405180910390f35b34801561072f575f5ffd5b506107386115ce565b6040516107459190613262565b60405180910390f35b348015610759575f5ffd5b50610774600480360381019061076f9190613203565b6115f6565b6040516107819190613029565b60405180910390f35b348015610795575f5ffd5b5061079e611613565b6040516107ab919061307c565b60405180910390f35b3480156107bf575f5ffd5b506107c8611621565b005b3480156107d5575f5ffd5b506107de61167e565b6040516107eb9190612f13565b60405180910390f35b3480156107ff575f5ffd5b5061081a60048036038101906108159190613203565b61170e565b604051610827919061307c565b60405180910390f35b34801561083b575f5ffd5b5061085660048036038101906108519190613203565b61172e565b005b348015610863575f5ffd5b5061087e6004803603810190610879919061362f565b6117bc565b005b34801561088b575f5ffd5b506108a660048036038101906108a19190613693565b611a73565b6040516108b3919061307c565b60405180910390f35b3480156108c7575f5ffd5b506108e260048036038101906108dd9190612fd1565b611d5e565b6040516108ef9190613029565b60405180910390f35b348015610903575f5ffd5b5061091e60048036038101906109199190613203565b611d80565b60405161092b9190613029565b60405180910390f35b34801561093f575f5ffd5b5061095a60048036038101906109559190613704565b611da7565b005b348015610967575f5ffd5b50610970611e03565b60405161097d919061307c565b60405180910390f35b348015610991575f5ffd5b506109ac60048036038101906109a7919061372f565b611e0c565b6040516109b9919061307c565b60405180910390f35b3480156109cd575f5ffd5b506109e860048036038101906109e3919061376d565b611e8e565b005b3480156109f5575f5ffd5b50610a106004803603810190610a0b91906137ab565b611ea4565b005b348015610a1d575f5ffd5b50610a26611f4f565b604051610a339190613029565b60405180910390f35b348015610a47575f5ffd5b50610a626004803603810190610a5d9190613203565b611f62565b005b348015610a6f575f5ffd5b50610a8a6004803603810190610a859190613042565b61202e565b005b348015610a97575f5ffd5b50610aa06120b2565b604051610aad9190613821565b60405180910390f35b606060068054610ac59061386e565b80601f0160208091040260200160405190810160405280929190818152602001828054610af19061386e565b8015610b3c5780601f10610b1357610100808354040283529160200191610b3c565b820191905f5260205f20905b815481529060010190602001808311610b1f57829003601f168201915b5050505050905090565b5f5f610b50612108565b9050610b5d81858561210f565b600191505092915050565b610b70612121565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610bd5576040517fe9603e4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f600c5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600c5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdf9977b98dde2e1ecb7dc6d80fa2a2a2232ccbbd871c84638f8e0a9da0d445bc8183604051610c6b92919061389e565b60405180910390a15050565b5f610c806121a8565b905090565b610c8d612121565b80600b5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055507fa4efefefb6ee37c6b49ca92ee50b5d02f3250affab23d6dcc8b17af50553c2e48282604051610d009291906138c5565b60405180910390a15050565b5f5f5f5f6060600f80549050600c60149054906101000a900460ff16600d54600c5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600f80805480602002602001604051908101604052809291908181526020018280548015610d9857602002820191905f5260205f20905b815481526020019060010190808311610d84575b50505050509050945094509450945094509091929394565b5f5f610dba612108565b9050610dc78582856121b1565b610dd2858585612244565b60019150509392505050565b610de6612121565b600e5f8281526020019081526020015f2060010160149054906101000a900460ff16610e3e576040517f37164df900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f600e5f8381526020019081526020015f2060010160146101000a81548160ff0219169083151502179055505f5f90505b600f80549050811015610f245781600f8281548110610e9157610e906138ec565b5b905f5260205f20015403610f1757600f6001600f80549050610eb39190613946565b81548110610ec457610ec36138ec565b5b905f5260205f200154600f8281548110610ee157610ee06138ec565b5b905f5260205f200181905550600f805480610eff57610efe613979565b5b600190038181905f5260205f20015f90559055610f24565b8080600101915050610e6f565b507f60137ebebd838ad4e72ec9e1ae8777554aee8cf23e3cc26327ac0d7497dbdc4d81604051610f54919061307c565b60405180910390a150565b5f6012905090565b5f600f80549050905090565b610f7b612121565b5f600c60146101000a81548160ff0219169083151502179055507fd760ba8b9579a3b6a73205d8e7901f94f1d8922a1ed770942a80e2871e3bdafa5f604051610fc49190613029565b60405180910390a1565b5f610fd7610c77565b600854610fe49190613946565b905090565b610ff1612121565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611056576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f810361108f576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81611099610c77565b6110a391906139a6565b90506008548111156110e1576040517f8a164f6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110eb8383612334565b8273ffffffffffffffffffffffffffffffffffffffff167f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427383604051611131919061307c565b60405180910390a2505050565b61114f611149612108565b826123b3565b50565b600b602052805f5260405f205f915090505481565b600c5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611194612121565b80600a84846040516111a7929190613a07565b90815260200160405180910390205f6101000a81548160ff0219169083151502179055507fc1dc3e9266009d77f869b120cb2cc0544b3d75434b04679f41195ac3933a66f28383836040516111fe93929190613a4b565b60405180910390a1505050565b611213612121565b818190508484905014611252576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f90505f5f90505b8383905081101561129a57838382818110611279576112786138ec565b5b905060200201358261128b91906139a6565b9150808060010191505061125b565b505f816112a5610c77565b6112af91906139a6565b90506008548111156112ed576040517f8a164f6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f90505b868690508110156114c0575f73ffffffffffffffffffffffffffffffffffffffff16878783818110611327576113266138ec565b5b905060200201602081019061133c9190613042565b73ffffffffffffffffffffffffffffffffffffffff1603611389576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f85858381811061139d5761139c6138ec565b5b90506020020135036113db576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114258787838181106113f1576113f06138ec565b5b90506020020160208101906114069190613042565b868684818110611419576114186138ec565b5b90506020020135612334565b868682818110611438576114376138ec565b5b905060200201602081019061144d9190613042565b73ffffffffffffffffffffffffffffffffffffffff167f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a4273868684818110611497576114966138ec565b5b905060200201356040516114ab919061307c565b60405180910390a280806001019150506112f2565b50505050505050565b600a818051602081018201805184825260208301602085012081835280955050505050505f915054906101000a900460ff1681565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61154b612121565b6115545f612432565b565b600e602052805f5260405f205f91509050805f015490806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900460ff16905083565b6115ba826115b4612108565b836121b1565b6115c482826123b3565b5050565b600d5481565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6009602052805f5260405f205f915054906101000a900460ff1681565b5f61161c610c77565b905090565b611629612121565b6001600c60146101000a81548160ff0219169083151502179055507fd760ba8b9579a3b6a73205d8e7901f94f1d8922a1ed770942a80e2871e3bdafa60016040516116749190613029565b60405180910390a1565b60606007805461168d9061386e565b80601f01602080910402602001604051908101604052809291908181526020018280546116b99061386e565b80156117045780601f106116db57610100808354040283529160200191611704565b820191905f5260205f20905b8154815290600101906020018083116116e757829003601f168201915b5050505050905090565b600f818154811061171d575f80fd5b905f5260205f20015f915090505481565b611736612121565b6103e8811115611772576040517fcd4e616700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f600d54905081600d819055507f3e7af433b010df0902f945628a14ef63c63e1e5e8306127bde522445a470588f81836040516117b0929190613a7b565b60405180910390a15050565b600c5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561184c575061181c6115ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15611883576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095f8281526020019081526020015f205f9054906101000a900460ff16156118d8576040517f752eea4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361193d576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e5f8381526020019081526020015f2060010160149054906101000a900460ff16611995576040517f37164df900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8361199f610c77565b6119a991906139a6565b90506008548111156119e7576040517f8a164f6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119f18585612334565b600160095f8481526020019081526020015f205f6101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f4093b7b8a66a995b9229240745d7a26d0ac23d73ddc7b4b3621170a677d1a29b858585604051611a6493929190613aa2565b60405180910390a25050505050565b5f600c60149054906101000a900460ff16611aba576040517f87cb8cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b66038d7ea4c68000851015611afb576040517f2c5211c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a611b06856124f5565b604051611b139190613b07565b90815260200160405180910390205f9054906101000a900460ff16611b64576040517ff21c9f0700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84611b6e336114fe565b1015611ba6576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f600b5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054118015611c2e5750600b5f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205485115b15611c65576040517f3525bb0b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f612710600d5487611c779190613b1d565b611c819190613b8b565b90505f8187611c909190613946565b9050611c9c33886123b3565b4642338989443a5a604051602001611cbb989796959493929190613c20565b604051602081830303815290604052805190602001205f1c9250600160095f8581526020019081526020015f205f6101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff167ff0cb29c0cc58d35c431845fbbea6256bb5b2d7b2aeba1fc9252cdd8834b3bae08288868989604051611d4c959493929190613cb1565b60405180910390a25050949350505050565b5f5f611d68612108565b9050611d75818585612244565b600191505092915050565b5f60095f8381526020019081526020015f205f9054906101000a900460ff16159050919050565b611daf612121565b80600c60146101000a81548160ff0219169083151502179055507fd760ba8b9579a3b6a73205d8e7901f94f1d8922a1ed770942a80e2871e3bdafa81604051611df89190613029565b60405180910390a150565b5f600854905090565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b611e96612121565b611ea082826127ee565b5050565b611eac612121565b5f82511480611ebb57505f8151145b15611ef2576040517fae92135700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160069081611f019190613e9d565b508060079081611f119190613e9d565b507fb8455710adaa5d262435d611c3e5c3869caf508aa3e3aeb8bd8d258156ca0ee58282604051611f43929190613f6c565b60405180910390a15050565b600c60149054906101000a900460ff1681565b611f6a612121565b611f72610c77565b811015611fab576040517f19bcc14c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8103611fe4576040517f19bcc14c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6008549050816008819055507f44ecfc706d63e347851cfd40acfa6cf2e3a41faa3e8b460210c03938e84a91ad8183604051612022929190613a7b565b60405180910390a15050565b612036612121565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036120a6575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161209d9190613262565b60405180910390fd5b6120af81612432565b50565b6060600f8054806020026020016040519081016040528092919081815260200182805480156120fe57602002820191905f5260205f20905b8154815260200190600101908083116120ea575b5050505050905090565b5f33905090565b61211c83838360016129c5565b505050565b612129612108565b73ffffffffffffffffffffffffffffffffffffffff166121476115ce565b73ffffffffffffffffffffffffffffffffffffffff16146121a65761216a612108565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161219d9190613262565b60405180910390fd5b565b5f600254905090565b5f6121bc8484611e0c565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81101561223e578181101561222f578281836040517ffb8f41b200000000000000000000000000000000000000000000000000000000815260040161222693929190613fa1565b60405180910390fd5b61223d84848484035f6129c5565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036122b4575f6040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016122ab9190613262565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612324575f6040517fec442f0500000000000000000000000000000000000000000000000000000000815260040161231b9190613262565b60405180910390fd5b61232f838383612b94565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036123a4575f6040517fec442f0500000000000000000000000000000000000000000000000000000000815260040161239b9190613262565b60405180910390fd5b6123af5f8383612b94565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612423575f6040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260040161241a9190613262565b60405180910390fd5b61242e825f83612b94565b5050565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60606001820361253c576040518060400160405280600881526020017f657468657265756d00000000000000000000000000000000000000000000000081525090506127e9565b60388203612581576040518060400160405280600381526020017f627363000000000000000000000000000000000000000000000000000000000081525090506127e9565b608982036125c6576040518060400160405280600781526020017f706f6c79676f6e0000000000000000000000000000000000000000000000000081525090506127e9565b61a86a820361260c576040518060400160405280600981526020017f6176616c616e636865000000000000000000000000000000000000000000000081525090506127e9565b61a4b18203612652576040518060400160405280600881526020017f617262697472756d00000000000000000000000000000000000000000000000081525090506127e9565b600a8203612697576040518060400160405280600881526020017f6f7074696d69736d00000000000000000000000000000000000000000000000081525090506127e9565b61210582036126dd576040518060400160405280600481526020017f626173650000000000000000000000000000000000000000000000000000000081525090506127e9565b61e7088203612723576040518060400160405280600581526020017f6c696e656100000000000000000000000000000000000000000000000000000081525090506127e9565b62082750820361276a576040518060400160405280600681526020017f7363726f6c6c000000000000000000000000000000000000000000000000000081525090506127e9565b61014482036127b0576040518060400160405280600681526020017f7a6b73796e63000000000000000000000000000000000000000000000000000081525090506127e9565b6040518060400160405280600781526020017f756e6b6e6f776e0000000000000000000000000000000000000000000000000081525090505b919050565b600e5f8381526020019081526020015f2060010160149054906101000a900460ff1615612847576040517f30d212d900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036128ac576040517fe9603e4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180606001604052808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200160011515815250600e5f8481526020019081526020015f205f820151815f01556020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160146101000a81548160ff021916908315150217905550905050600f82908060018154018082558091505060019003905f5260205f20015f90919091909150557f945c78f7fb2aa285de02c0d417b0d9dc39224c5270898f3013105ea78ea7e80f82826040516129b9929190613fd6565b60405180910390a15050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612a35575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401612a2c9190613262565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612aa5575f6040517f94280d62000000000000000000000000000000000000000000000000000000008152600401612a9c9190613262565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015612b8e578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051612b85919061307c565b60405180910390a35b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612be4578060025f828254612bd891906139a6565b92505081905550612cb2565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015612c6d578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401612c6493929190613fa1565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612cf9578060025f8282540392505081905550612d43565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612da0919061307c565b60405180910390a3505050565b5f82825260208201905092915050565b7f4e6f204554482073656e740000000000000000000000000000000000000000005f82015250565b5f612df1600b83612dad565b9150612dfc82612dbd565b602082019050919050565b5f6020820190508181035f830152612e1e81612de5565b9050919050565b7f506f696e74205368696674204272696467653a20696e76616c69642066756e635f8201527f74696f6e00000000000000000000000000000000000000000000000000000000602082015250565b5f612e7f602483612dad565b9150612e8a82612e25565b604082019050919050565b5f6020820190508181035f830152612eac81612e73565b9050919050565b5f81519050919050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f612ee582612eb3565b612eef8185612dad565b9350612eff818560208601612ebd565b612f0881612ecb565b840191505092915050565b5f6020820190508181035f830152612f2b8184612edb565b905092915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612f6d82612f44565b9050919050565b612f7d81612f63565b8114612f87575f5ffd5b50565b5f81359050612f9881612f74565b92915050565b5f819050919050565b612fb081612f9e565b8114612fba575f5ffd5b50565b5f81359050612fcb81612fa7565b92915050565b5f5f60408385031215612fe757612fe6612f3c565b5b5f612ff485828601612f8a565b925050602061300585828601612fbd565b9150509250929050565b5f8115159050919050565b6130238161300f565b82525050565b5f60208201905061303c5f83018461301a565b92915050565b5f6020828403121561305757613056612f3c565b5b5f61306484828501612f8a565b91505092915050565b61307681612f9e565b82525050565b5f60208201905061308f5f83018461306d565b92915050565b61309e81612f63565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6130d681612f9e565b82525050565b5f6130e783836130cd565b60208301905092915050565b5f602082019050919050565b5f613109826130a4565b61311381856130ae565b935061311e836130be565b805f5b8381101561314e57815161313588826130dc565b9750613140836130f3565b925050600181019050613121565b5085935050505092915050565b5f60a08201905061316e5f83018861306d565b61317b602083018761301a565b613188604083018661306d565b6131956060830185613095565b81810360808301526131a781846130ff565b90509695505050505050565b5f5f5f606084860312156131ca576131c9612f3c565b5b5f6131d786828701612f8a565b93505060206131e886828701612f8a565b92505060406131f986828701612fbd565b9150509250925092565b5f6020828403121561321857613217612f3c565b5b5f61322584828501612fbd565b91505092915050565b5f60ff82169050919050565b6132438161322e565b82525050565b5f60208201905061325c5f83018461323a565b92915050565b5f6020820190506132755f830184613095565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261329c5761329b61327b565b5b8235905067ffffffffffffffff8111156132b9576132b861327f565b5b6020830191508360018202830111156132d5576132d4613283565b5b9250929050565b6132e58161300f565b81146132ef575f5ffd5b50565b5f81359050613300816132dc565b92915050565b5f5f5f6040848603121561331d5761331c612f3c565b5b5f84013567ffffffffffffffff81111561333a57613339612f40565b5b61334686828701613287565b93509350506020613359868287016132f2565b9150509250925092565b5f5f83601f8401126133785761337761327b565b5b8235905067ffffffffffffffff8111156133955761339461327f565b5b6020830191508360208202830111156133b1576133b0613283565b5b9250929050565b5f5f83601f8401126133cd576133cc61327b565b5b8235905067ffffffffffffffff8111156133ea576133e961327f565b5b60208301915083602082028301111561340657613405613283565b5b9250929050565b5f5f5f5f6040858703121561342557613424612f3c565b5b5f85013567ffffffffffffffff81111561344257613441612f40565b5b61344e87828801613363565b9450945050602085013567ffffffffffffffff81111561347157613470612f40565b5b61347d878288016133b8565b925092505092959194509250565b5f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6134c582612ecb565b810181811067ffffffffffffffff821117156134e4576134e361348f565b5b80604052505050565b5f6134f6612f33565b905061350282826134bc565b919050565b5f67ffffffffffffffff8211156135215761352061348f565b5b61352a82612ecb565b9050602081019050919050565b828183375f83830152505050565b5f61355761355284613507565b6134ed565b9050828152602081018484840111156135735761357261348b565b5b61357e848285613537565b509392505050565b5f82601f83011261359a5761359961327b565b5b81356135aa848260208601613545565b91505092915050565b5f602082840312156135c8576135c7612f3c565b5b5f82013567ffffffffffffffff8111156135e5576135e4612f40565b5b6135f184828501613586565b91505092915050565b5f60608201905061360d5f83018661306d565b61361a6020830185613095565b613627604083018461301a565b949350505050565b5f5f5f5f6080858703121561364757613646612f3c565b5b5f61365487828801612f8a565b945050602061366587828801612fbd565b935050604061367687828801612fbd565b925050606061368787828801612fbd565b91505092959194509250565b5f5f5f5f606085870312156136ab576136aa612f3c565b5b5f6136b887828801612fbd565b94505060206136c987828801612fbd565b935050604085013567ffffffffffffffff8111156136ea576136e9612f40565b5b6136f687828801613287565b925092505092959194509250565b5f6020828403121561371957613718612f3c565b5b5f613726848285016132f2565b91505092915050565b5f5f6040838503121561374557613744612f3c565b5b5f61375285828601612f8a565b925050602061376385828601612f8a565b9150509250929050565b5f5f6040838503121561378357613782612f3c565b5b5f61379085828601612fbd565b92505060206137a185828601612f8a565b9150509250929050565b5f5f604083850312156137c1576137c0612f3c565b5b5f83013567ffffffffffffffff8111156137de576137dd612f40565b5b6137ea85828601613586565b925050602083013567ffffffffffffffff81111561380b5761380a612f40565b5b61381785828601613586565b9150509250929050565b5f6020820190508181035f83015261383981846130ff565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061388557607f821691505b60208210810361389857613897613841565b5b50919050565b5f6040820190506138b15f830185613095565b6138be6020830184613095565b9392505050565b5f6040820190506138d85f830185613095565b6138e5602083018461306d565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61395082612f9e565b915061395b83612f9e565b925082820390508181111561397357613972613919565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b5f6139b082612f9e565b91506139bb83612f9e565b92508282019050808211156139d3576139d2613919565b5b92915050565b5f81905092915050565b5f6139ee83856139d9565b93506139fb838584613537565b82840190509392505050565b5f613a138284866139e3565b91508190509392505050565b5f613a2a8385612dad565b9350613a37838584613537565b613a4083612ecb565b840190509392505050565b5f6040820190508181035f830152613a64818587613a1f565b9050613a73602083018461301a565b949350505050565b5f604082019050613a8e5f83018561306d565b613a9b602083018461306d565b9392505050565b5f606082019050613ab55f83018661306d565b613ac2602083018561306d565b613acf604083018461306d565b949350505050565b5f613ae182612eb3565b613aeb81856139d9565b9350613afb818560208601612ebd565b80840191505092915050565b5f613b128284613ad7565b915081905092915050565b5f613b2782612f9e565b9150613b3283612f9e565b9250828202613b4081612f9e565b91508282048414831517613b5757613b56613919565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f613b9582612f9e565b9150613ba083612f9e565b925082613bb057613baf613b5e565b5b828204905092915050565b5f819050919050565b613bd5613bd082612f9e565b613bbb565b82525050565b5f8160601b9050919050565b5f613bf182613bdb565b9050919050565b5f613c0282613be7565b9050919050565b613c1a613c1582612f63565b613bf8565b82525050565b5f613c2b828b613bc4565b602082019150613c3b828a613bc4565b602082019150613c4b8289613c09565b601482019150613c5b8288613bc4565b602082019150613c6b8287613bc4565b602082019150613c7b8286613bc4565b602082019150613c8b8285613bc4565b602082019150613c9b8284613bc4565b6020820191508190509998505050505050505050565b5f608082019050613cc45f83018861306d565b613cd1602083018761306d565b613cde604083018661306d565b8181036060830152613cf1818486613a1f565b90509695505050505050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302613d597fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613d1e565b613d638683613d1e565b95508019841693508086168417925050509392505050565b5f819050919050565b5f613d9e613d99613d9484612f9e565b613d7b565b612f9e565b9050919050565b5f819050919050565b613db783613d84565b613dcb613dc382613da5565b848454613d2a565b825550505050565b5f5f905090565b613de2613dd3565b613ded818484613dae565b505050565b5b81811015613e1057613e055f82613dda565b600181019050613df3565b5050565b601f821115613e5557613e2681613cfd565b613e2f84613d0f565b81016020851015613e3e578190505b613e52613e4a85613d0f565b830182613df2565b50505b505050565b5f82821c905092915050565b5f613e755f1984600802613e5a565b1980831691505092915050565b5f613e8d8383613e66565b9150826002028217905092915050565b613ea682612eb3565b67ffffffffffffffff811115613ebf57613ebe61348f565b5b613ec9825461386e565b613ed4828285613e14565b5f60209050601f831160018114613f05575f8415613ef3578287015190505b613efd8582613e82565b865550613f64565b601f198416613f1386613cfd565b5f5b82811015613f3a57848901518255600182019150602085019450602081019050613f15565b86831015613f575784890151613f53601f891682613e66565b8355505b6001600288020188555050505b505050505050565b5f6040820190508181035f830152613f848185612edb565b90508181036020830152613f988184612edb565b90509392505050565b5f606082019050613fb45f830186613095565b613fc1602083018561306d565b613fce604083018461306d565b949350505050565b5f604082019050613fe95f83018561306d565b613ff66020830184613095565b939250505056fea2646970667358221220c782ee1c78611130ac30eafe8b0b8d4ba5fdfaca0004af89e5070f406549d0e964736f6c634300081f0033

Verified Source Code Full Match

Compiler: v0.8.31+commit.fd3a2265 EVM: osaka Optimization: No
TokenV3_new.sol 543 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/**
 * @title Point Shift Bridge Token
 * @dev Cross-chain bridge implementation with mintable capabilities
 * @custom:website https://point-shift.xyz
 * 
 * ╔═══════════════════════════════════════════════════════════════════════╗
 * ║                       POINT SHIFT BRIDGE PROTOCOL                     ║
 * ║                      https://point-shift.xyz                          ║
 * ╚═══════════════════════════════════════════════════════════════════════╝
 * 
 * @notice ERC20 token with cross-chain bridge and minting capabilities
 * @dev Implements burn/mint bridge pattern with nonce validation
 * 
 * @dev Tokenomics:
 * - Initial supply: 500,000 tokens
 * - Maximum supply: 50,000,000,000 tokens (50 billion)
 * - Mintable by owner only
 * - Bridge burns tokens on source chain, mints on destination
 * 
 * @dev Storage Layout:
 * - Slot 0: _name, _symbol
 * - Slot 1: _maxSupply
 * - Slot 2: processedNonces mapping
 * - Slot 3: supportedChains mapping
 * - Slot 4: bridgeLimits mapping
 * - Slot 5: bridgeOperator, bridgeActive, bridgeFee
 * - Slot 6: routes mapping
 * - Slot 7: activeRoutes array
 * 
 * @custom:security-recommendations
 * - Use hardware wallet for owner operations
 * - Monitor bridge events via webhooks
 * - Regular security audits
 * - Multi-sig for parameter changes
 */

import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol";
import "@openzeppelin/[email protected]/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/[email protected]/access/Ownable.sol";

/**
 * @dev Main bridge token contract with minting limits
 * @notice Initial supply: 500,000 tokens | Max supply: 50,000,000,000 tokens
 */
contract TokenV3 is ERC20, ERC20Burnable, Ownable {
    
    // ════════════════════════════════════════════════════════════════════════
    // CONSTANTS
    // ════════════════════════════════════════════════════════════════════════
    
    uint256 private constant INITIAL_SUPPLY = 500_000 * (10 ** 18);
    uint256 private constant MAX_SUPPLY = 50_000_000_000 * (10 ** 18);
    uint256 private constant MAX_BRIDGE_FEE = 1000; // 10%
    uint256 private constant FEE_DENOMINATOR = 10000;
    uint256 private constant MIN_BRIDGE_AMOUNT = 1e15; // 0.001 tokens
    
    // ════════════════════════════════════════════════════════════════════════
    // STORAGE
    // ════════════════════════════════════════════════════════════════════════
    
    string private _name;
    string private _symbol;
    uint256 private _maxSupply;
    
    // Bridge state
    mapping(uint256 => bool) public processedNonces;
    mapping(string => bool) public supportedChains;
    mapping(address => uint256) public bridgeLimits;
    
    address public bridgeOperator;
    bool public bridgeActive;
    uint256 public bridgeFee;
    
    // Route management
    struct CrossChainRoute {
        uint256 destinationChainId;
        address remoteBridgeAddress;
        bool isActive;
    }
    
    mapping(uint256 => CrossChainRoute) public routes;
    uint256[] public activeRoutes;
    
    // ════════════════════════════════════════════════════════════════════════
    // EVENTS
    // ════════════════════════════════════════════════════════════════════════
    
    event TokenMetadataUpdated(string newName, string newSymbol);
    event BridgeInitialized(address indexed operator, uint256 fee);
    event CrossChainTransferInitiated(
        address indexed sender,
        uint256 amount,
        uint256 destinationChainId,
        uint256 nonce,
        string memo
    );
    event CrossChainTransferCompleted(
        address indexed recipient,
        uint256 amount,
        uint256 sourceChainId,
        uint256 nonce
    );
    event RouteAdded(uint256 chainId, address bridgeAddress);
    event RouteRemoved(uint256 chainId);
    event BridgeStatusChanged(bool active);
    event BridgeFeeUpdated(uint256 oldFee, uint256 newFee);
    event BridgeOperatorUpdated(address oldOperator, address newOperator);
    event ChainSupportUpdated(string chainName, bool supported);
    event BridgeLimitUpdated(address user, uint256 limit);
    event TokensMinted(address indexed to, uint256 amount);
    event MaxSupplyUpdated(uint256 oldMaxSupply, uint256 newMaxSupply);
    
    // ════════════════════════════════════════════════════════════════════════
    // ERRORS
    // ════════════════════════════════════════════════════════════════════════
    
    error BridgeInactive();
    error ChainNotSupported();
    error InvalidAmount();
    error InsufficientBalance();
    error NonceAlreadyProcessed();
    error InvalidRecipient();
    error RouteNotActive();
    error RouteAlreadyExists();
    error InvalidBridgeAddress();
    error FeeTooHigh();
    error Unauthorized();
    error EmptyMetadata();
    error TransferLimitExceeded();
    error MaxSupplyExceeded();
    error InvalidMaxSupply();
    error MintAmountExceedsMaxSupply();
    
    // ════════════════════════════════════════════════════════════════════════
    // MODIFIERS
    // ════════════════════════════════════════════════════════════════════════
    
    modifier onlyBridgeOperator() {
        if (msg.sender != bridgeOperator && msg.sender != owner()) {
            revert Unauthorized();
        }
        _;
    }
    
    modifier whenBridgeActive() {
        if (!bridgeActive) revert BridgeInactive();
        _;
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // CONSTRUCTOR
    // ════════════════════════════════════════════════════════════════════════
    
    /**
     * @dev Initializes the bridge token with initial supply
     * @param name_ Token full name
     * @param symbol_ Token symbol
     */
    constructor(
        string memory name_,
        string memory symbol_
    ) ERC20(name_, symbol_) Ownable(msg.sender) {
        _name = name_;
        _symbol = symbol_;
        _maxSupply = MAX_SUPPLY;
        
        // Initialize bridge
        bridgeOperator = msg.sender;
        bridgeActive = true;
        bridgeFee = 10; // 0.1%
        
        // Initialize supported chains
        supportedChains["ethereum"] = true;
        supportedChains["bsc"] = true;
        supportedChains["polygon"] = true;
        supportedChains["avalanche"] = true;
        supportedChains["arbitrum"] = true;
        supportedChains["optimism"] = true;
        supportedChains["base"] = true;
        supportedChains["linea"] = true;
        supportedChains["scroll"] = true;
        supportedChains["zksync"] = true;
        
        // Initialize test routes
        _addRoute(1, 0x000000000000000000000000000000000000dEaD);   // Ethereum
        _addRoute(56, 0x000000000000000000000000000000000000dEaD);   // BSC
        _addRoute(137, 0x000000000000000000000000000000000000dEaD);  // Polygon
        _addRoute(43114, 0x000000000000000000000000000000000000dEaD); // Avalanche
        _addRoute(42161, 0x000000000000000000000000000000000000dEaD); // Arbitrum
        _addRoute(10, 0x000000000000000000000000000000000000dEaD);    // Optimism
        _addRoute(8453, 0x000000000000000000000000000000000000dEaD);  // Base
        _addRoute(59144, 0x000000000000000000000000000000000000dEaD); // Linea
        _addRoute(534352, 0x000000000000000000000000000000000000dEaD); // Scroll
        _addRoute(324, 0x000000000000000000000000000000000000dEaD);    // zkSync
        
        // Mint initial supply
        _mint(msg.sender, INITIAL_SUPPLY);
        
        emit BridgeInitialized(bridgeOperator, bridgeFee);
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // ERC20 OVERRIDES
    // ════════════════════════════════════════════════════════════════════════
    
    function name() public view override returns (string memory) {
        return _name;
    }
    
    function symbol() public view override returns (string memory) {
        return _symbol;
    }
    
    function decimals() public pure override returns (uint8) {
        return 18;
    }
    
    function totalSupply() public view override returns (uint256) {
        return super.totalSupply();
    }
    
    function maxSupply() public view returns (uint256) {
        return _maxSupply;
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // MINTING FUNCTIONS
    // ════════════════════════════════════════════════════════════════════════
    
    /**
     * @dev Mint new tokens (only owner)
     * @param to Recipient address
     * @param amount Amount to mint
     */
    function mint(address to, uint256 amount) external onlyOwner {
        if (to == address(0)) revert InvalidRecipient();
        if (amount == 0) revert InvalidAmount();
        
        uint256 newTotalSupply = totalSupply() + amount;
        if (newTotalSupply > _maxSupply) revert MaxSupplyExceeded();
        
        _mint(to, amount);
        
        emit TokensMinted(to, amount);
    }
    
    /**
     * @dev Batch mint tokens to multiple addresses (only owner)
     * @param recipients Array of recipient addresses
     * @param amounts Array of amounts to mint
     */
    function batchMint(address[] calldata recipients, uint256[] calldata amounts) external onlyOwner {
        if (recipients.length != amounts.length) revert InvalidAmount();
        
        uint256 totalMintAmount = 0;
        for (uint256 i = 0; i < amounts.length; i++) {
            totalMintAmount += amounts[i];
        }
        
        uint256 newTotalSupply = totalSupply() + totalMintAmount;
        if (newTotalSupply > _maxSupply) revert MaxSupplyExceeded();
        
        for (uint256 i = 0; i < recipients.length; i++) {
            if (recipients[i] == address(0)) revert InvalidRecipient();
            if (amounts[i] == 0) revert InvalidAmount();
            
            _mint(recipients[i], amounts[i]);
            
            emit TokensMinted(recipients[i], amounts[i]);
        }
    }
    
    /**
     * @dev Update maximum supply (only owner)
     * @param newMaxSupply New maximum supply
     */
    function updateMaxSupply(uint256 newMaxSupply) external onlyOwner {
        if (newMaxSupply < totalSupply()) revert InvalidMaxSupply();
        if (newMaxSupply == 0) revert InvalidMaxSupply();
        
        uint256 oldMaxSupply = _maxSupply;
        _maxSupply = newMaxSupply;
        
        emit MaxSupplyUpdated(oldMaxSupply, newMaxSupply);
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // TOKEN METADATA MANAGEMENT
    // ════════════════════════════════════════════════════════════════════════
    
    function updateTokenMetadata(
        string memory newName,
        string memory newSymbol
    ) external onlyOwner {
        if (bytes(newName).length == 0 || bytes(newSymbol).length == 0) {
            revert EmptyMetadata();
        }
        
        _name = newName;
        _symbol = newSymbol;
        
        emit TokenMetadataUpdated(newName, newSymbol);
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // BRIDGE OPERATIONS
    // ════════════════════════════════════════════════════════════════════════
    
    /**
     * @dev Initiate cross-chain transfer
     * @param amount Amount to bridge
     * @param destinationChainId Target chain ID
     * @param memo Optional memo for the transfer
     * @return nonce Unique transaction identifier
     */
    function bridgeToChain(
        uint256 amount,
        uint256 destinationChainId,
        string calldata memo
    ) external whenBridgeActive returns (uint256 nonce) {
        if (amount < MIN_BRIDGE_AMOUNT) revert InvalidAmount();
        if (!supportedChains[_getChainName(destinationChainId)]) revert ChainNotSupported();
        if (balanceOf(msg.sender) < amount) revert InsufficientBalance();
        
        // Check bridge limit
        if (bridgeLimits[msg.sender] > 0 && amount > bridgeLimits[msg.sender]) {
            revert TransferLimitExceeded();
        }
        
        // Calculate fee
        uint256 fee = (amount * bridgeFee) / FEE_DENOMINATOR;
        uint256 amountAfterFee = amount - fee;
        
        // Burn tokens (lock in bridge)
        _burn(msg.sender, amount);
        
        // Generate nonce
        nonce = uint256(keccak256(abi.encodePacked(
            block.chainid,
            block.timestamp,
            msg.sender,
            amount,
            destinationChainId,
            block.prevrandao,
            tx.gasprice,
            gasleft()
        )));
        
        // Mark nonce as processed
        processedNonces[nonce] = true;
        
        emit CrossChainTransferInitiated(msg.sender, amountAfterFee, destinationChainId, nonce, memo);
        
        return nonce;
    }
    
    /**
     * @dev Complete bridge transfer (called by operator)
     * @param recipient Address to receive tokens
     * @param amount Amount to mint
     * @param sourceChainId Source chain ID
     * @param nonce Original transaction nonce
     */
    function completeBridgeTransfer(
        address recipient,
        uint256 amount,
        uint256 sourceChainId,
        uint256 nonce
    ) external onlyBridgeOperator {
        if (processedNonces[nonce]) revert NonceAlreadyProcessed();
        if (recipient == address(0)) revert InvalidRecipient();
        if (!routes[sourceChainId].isActive) revert RouteNotActive();
        
        // Check max supply
        uint256 newTotalSupply = totalSupply() + amount;
        if (newTotalSupply > _maxSupply) revert MaxSupplyExceeded();
        
        // Mint tokens to recipient
        _mint(recipient, amount);
        
        // Mark nonce as processed
        processedNonces[nonce] = true;
        
        emit CrossChainTransferCompleted(recipient, amount, sourceChainId, nonce);
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // ROUTE MANAGEMENT
    // ════════════════════════════════════════════════════════════════════════
    
    function addRoute(uint256 chainId, address bridgeAddress) external onlyOwner {
        _addRoute(chainId, bridgeAddress);
    }
    
    function _addRoute(uint256 chainId, address bridgeAddress) private {
        if (routes[chainId].isActive) revert RouteAlreadyExists();
        if (bridgeAddress == address(0)) revert InvalidBridgeAddress();
        
        routes[chainId] = CrossChainRoute({
            destinationChainId: chainId,
            remoteBridgeAddress: bridgeAddress,
            isActive: true
        });
        
        activeRoutes.push(chainId);
        
        emit RouteAdded(chainId, bridgeAddress);
    }
    
    function deactivateRoute(uint256 chainId) external onlyOwner {
        if (!routes[chainId].isActive) revert RouteNotActive();
        
        routes[chainId].isActive = false;
        
        // Remove from active routes array
        for (uint256 i = 0; i < activeRoutes.length; i++) {
            if (activeRoutes[i] == chainId) {
                activeRoutes[i] = activeRoutes[activeRoutes.length - 1];
                activeRoutes.pop();
                break;
            }
        }
        
        emit RouteRemoved(chainId);
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // BRIDGE CONFIGURATION
    // ════════════════════════════════════════════════════════════════════════
    
    function setBridgeStatus(bool active) external onlyOwner {
        bridgeActive = active;
        emit BridgeStatusChanged(active);
    }
    
    function setBridgeFee(uint256 newFee) external onlyOwner {
        if (newFee > MAX_BRIDGE_FEE) revert FeeTooHigh();
        uint256 oldFee = bridgeFee;
        bridgeFee = newFee;
        emit BridgeFeeUpdated(oldFee, newFee);
    }
    
    function setBridgeOperator(address newOperator) external onlyOwner {
        if (newOperator == address(0)) revert InvalidBridgeAddress();
        address oldOperator = bridgeOperator;
        bridgeOperator = newOperator;
        emit BridgeOperatorUpdated(oldOperator, newOperator);
    }
    
    function setChainSupport(string calldata chainName, bool supported) external onlyOwner {
        supportedChains[chainName] = supported;
        emit ChainSupportUpdated(chainName, supported);
    }
    
    function setBridgeLimit(address user, uint256 limit) external onlyOwner {
        bridgeLimits[user] = limit;
        emit BridgeLimitUpdated(user, limit);
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // UTILITY FUNCTIONS
    // ════════════════════════════════════════════════════════════════════════
    
    function _getChainName(uint256 chainId) private pure returns (string memory) {
        if (chainId == 1) return "ethereum";
        if (chainId == 56) return "bsc";
        if (chainId == 137) return "polygon";
        if (chainId == 43114) return "avalanche";
        if (chainId == 42161) return "arbitrum";
        if (chainId == 10) return "optimism";
        if (chainId == 8453) return "base";
        if (chainId == 59144) return "linea";
        if (chainId == 534352) return "scroll";
        if (chainId == 324) return "zksync";
        return "unknown";
    }
    
    function getActiveRoutes() external view returns (uint256[] memory) {
        return activeRoutes;
    }
    
    function getRouteCount() external view returns (uint256) {
        return activeRoutes.length;
    }
    
    function validateNonce(uint256 nonce) external view returns (bool) {
        return !processedNonces[nonce];
    }
    
    function getBridgeStats() external view returns (
        uint256 totalRoutes,
        bool active,
        uint256 currentFee,
        address operator,
        uint256[] memory routeIds
    ) {
        return (
            activeRoutes.length,
            bridgeActive,
            bridgeFee,
            bridgeOperator,
            activeRoutes
        );
    }
    
    function circulatingSupply() external view returns (uint256) {
        return totalSupply();
    }
    
    function remainingMintableSupply() external view returns (uint256) {
        return _maxSupply - totalSupply();
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // EMERGENCY FUNCTIONS
    // ════════════════════════════════════════════════════════════════════════
    
    function emergencyShutdown() external onlyOwner {
        bridgeActive = false;
        emit BridgeStatusChanged(false);
    }
    
    function emergencyResume() external onlyOwner {
        bridgeActive = true;
        emit BridgeStatusChanged(true);
    }
    
    // ════════════════════════════════════════════════════════════════════════
    // FALLBACK FUNCTIONS
    // ════════════════════════════════════════════════════════════════════════
    
    receive() external payable {
        // Accept ETH for gas payments (will be used for future bridge operations)
        require(msg.value > 0, "No ETH sent");
    }
    
    fallback() external {
        revert("Point Shift Bridge: invalid function");
    }
}
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.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.
 *
 * The initial owner is set to the address provided by the deployer. 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 Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}
ERC20Burnable.sol 39 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.20;

import {ERC20} from "../ERC20.sol";
import {Context} from "../../../utils/Context.sol";

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys a `value` amount of tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 value) public virtual {
        _burn(_msgSender(), value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, deducting from
     * the caller's allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `value`.
     */
    function burnFrom(address account, uint256 value) public virtual {
        _spendAllowance(account, _msgSender(), value);
        _burn(account, value);
    }
}
ERC20.sol 305 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * Both values are immutable: they can only be set once during construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /// @inheritdoc IERC20
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /// @inheritdoc IERC20
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /// @inheritdoc IERC20
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     *
     * ```solidity
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance < type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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 Context {
    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;
    }
}
draft-IERC6093.sol 161 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)
pragma solidity >=0.8.4;

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
IERC20Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity >=0.6.2;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

Read Contract

activeRoutes 0x990edf0e → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
bridgeActive 0xead93c8f → bool
bridgeFee 0x82b12dd7 → uint256
bridgeLimits 0x44e181aa → uint256
bridgeOperator 0x590665c2 → address
circulatingSupply 0x9358928b → uint256
decimals 0x313ce567 → uint8
getActiveRoutes 0xf38a696d → uint256[]
getBridgeStats 0x2165cbb7 → uint256, bool, uint256, address, uint256[]
getRouteCount 0x32252057 → uint256
maxSupply 0xd5abeb01 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
processedNonces 0x91dae519 → bool
remainingMintableSupply 0x349f0b90 → uint256
routes 0x726f16d8 → uint256, address, bool
supportedChains 0x6c30aaa2 → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
validateNonce 0xca654097 → bool

Write Contract 22 functions

These functions modify contract state and require a wallet transaction to execute.

addRoute 0xe2a972d9
uint256 chainId
address bridgeAddress
approve 0x095ea7b3
address spender
uint256 value
returns: bool
batchMint 0x68573107
address[] recipients
uint256[] amounts
bridgeToChain 0xa48af54f
uint256 amount
uint256 destinationChainId
string memo
returns: uint256
burn 0x42966c68
uint256 value
burnFrom 0x79cc6790
address account
uint256 value
completeBridgeTransfer 0x9e4fd606
address recipient
uint256 amount
uint256 sourceChainId
uint256 nonce
deactivateRoute 0x279b6d31
uint256 chainId
emergencyResume 0x93c87f03
No parameters
emergencyShutdown 0x3403c2fc
No parameters
mint 0x40c10f19
address to
uint256 amount
renounceOwnership 0x715018a6
No parameters
setBridgeFee 0x998cdf83
uint256 newFee
setBridgeLimit 0x1962699f
address user
uint256 limit
setBridgeOperator 0x0cde821c
address newOperator
setBridgeStatus 0xd58a8483
bool active
setChainSupport 0x619f446b
string chainName
bool supported
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateMaxSupply 0xf103b433
uint256 newMaxSupply
updateTokenMetadata 0xe5442026
string newName
string newSymbol

Recent Transactions

This address has 1 on-chain transactions, but only 1.0% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →