followup changes to ido contracts
This commit is contained in:
parent
3f8a9cd026
commit
335818460f
1 changed files with 16 additions and 12 deletions
|
|
@ -77,16 +77,16 @@ const IDO_SIGNATURE: &[u8] = &[
|
||||||
|
|
||||||
static OFFERING_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0ce01207f75c0519c637600ce8800cf517f755f845188675879827701209dc0009d00d000d394765479a269765579950500e876481796005c7900a063577900a069587900a0695c79587995048033e1015a7995a169785d7995587995048033e1010400e1f5059596776e947b757c7800a0696854790087535e7900a06376608577687863760120857768005f7900a0635f795680547958807e77686e7e51d28851d15779517e8851d356799d02aa20012060797e5e797eaa7e01877e51cd8852796351cc5579a26952d100876452d101207f75577987916968c4539d6752d158798852d35579a26902aa20525152807e5f797eaa7e01877e52cd8853d100876453d101207f7557798791696854d100876454d101207f75577987916968c4559d6800cf517f77547f758100cc00c6527993a26900cd00c78800cf557f77547f758100cf557f75788b54807e00d28800ce00d1886d6d6d6d686d6d6d6d6d51").unwrap());
|
static OFFERING_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0ce01207f75c0519c637600ce8800cf517f755f845188675879827701209dc0009d00d000d394765479a269765579950500e876481796005c7900a063577900a069587900a0695c79587995048033e1015a7995a169785d7995587995048033e1010400e1f5059596776e947b757c7800a0696854790087535e7900a06376608577687863760120857768005f7900a0635f795680547958807e77686e7e51d28851d15779517e8851d356799d02aa20012060797e5e797eaa7e01877e51cd8852796351cc5579a26952d100876452d101207f75577987916968c4539d6752d158798852d35579a26902aa20525152807e5f797eaa7e01877e52cd8853d100876453d101207f7557798791696854d100876454d101207f75577987916968c4559d6800cf517f77547f758100cc00c6527993a26900cd00c78800cf557f77547f758100cf557f75788b54807e00d28800ce00d1886d6d6d6d686d6d6d6d6d51").unwrap());
|
||||||
static OFFERING_ENTRY_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("827701209dc0519dc0ce01207f7500ce01207f758800cf517f755f845288c0cf517f7501208401008763c0c878c88876c9529d687551").unwrap());
|
static OFFERING_ENTRY_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("827701209dc0519dc0ce01207f7500ce01207f758800cf517f755f845288c0cf517f7501208401008763c0c878c88876c9529d687551").unwrap());
|
||||||
static LAUNCHER_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("0xc0009d00c852c88852c9529d00c854c88854c9549d00c855c88855c9559d00ce01207f7551ce78527e8851cf517f755f8401008853ce01207f7555798853cf567f75817600a06953d100876453d101207f7552798791696851d0547aa07651d0557aa09b63537952799f696851cf557f77547f758100a16302aa2001205d797e57797eaa7e01877e556085537956807e0058807e52d058807e0058807e00d28800d154798800d3009d00cd788851cd788851cc52c6a26951d152ce8851d352d09d51d2008852d10088c4549d75675279517e00d18800d3009d766355ca827755ca7853947f77527f758155ca527953945279947f77787f75526085557956807e51cf557f77547f757e0058807e52d058807e0058807e00d28802aa205979827751805a797e01207e60797e52797eaa7e01877e00cd8802aa20012060797e5a797eaa7e01877e52cd8852cc52c6a26952d152ce8852d352d09d52d2008854d10088c4559d6d756754ca827754ca7853947f77527f758154ca527953945279947f77787f7551d07600a06354d152ce8854d3789d54d2008802aa2001200111797e5b797eaa7e01877e54cd8855d10088c4569d6754d10088c4559d6852567956807e51cf557f77547f757e0058807e7858807e0058807e00d28802aa205c79827751805d797e5c79827751807e5c797e5b79827751807e5b797e01207e5a797e547e5f797e01207e60797e01207e0111797e53797eaa7e01877e00cd8852d152ce8852d352d05279949d52cc52c6a26902aa20520052807e5d797eaa7e01877e52cd8852d200886d6d6802aa2056798277518057797e5a797eaa7e01877e51cd88545b797e51d28851cc51c6a26951d153798851d3009d686d6d6d6d6d6d51").unwrap());
|
static LAUNCHER_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0009d00c852c88852c9529d00c854c88854c9549d00c855c88855c9559d00ce01207f7551ce78527e8851cf517f755f8401008853ce01207f7555798853cf567f75817600a06953d100876453d101207f7552798791696851d0547aa07651d0557aa09b63537952799f696851cf557f77547f758100a16302aa2001205d797e57797eaa7e01877e556085537956807e0058807e52d058807e0058807e00d28800d154798800d3009d00cd788851cd788851cc52c6a26951d152ce8851d352d09d51d2008852d10088c4549d75675279517e00d18800d3009d766355ca827755ca7853947f77527f758155ca527953945279947f77787f75526085557956807e51cf557f77547f757e0058807e52d058807e0058807e00d28802aa20c101147f755a79827751807e5a797e01207e60797e52797eaa7e01877e00cd8802aa20012060797e5a797eaa7e01877e52cd8852cc52c6a26952d152ce8852d352d09d52d2008854d10088c4559d6d756754ca827754ca7853947f77527f758154ca527953945279947f77787f7551d07600a06354d152ce8854d3789d54d2008802aa2001200111797e5b797eaa7e01877e54cd8855d10088c4569d6754d10088c4559d6852567956807e51cf557f77547f757e0058807e7858807e0058807e00d28802aa20c101147f755d79827751807e5d797e5c79827751807e5c797e5b79827751807e5b797e01207e5a797e547e5f797e01207e60797e01207e0111797e53797eaa7e01877e00cd8852d152ce8852d352d05279949d52cc52c6a26902aa20520052807e5d797eaa7e01877e52cd8852d200886d6d6802aa2056798277518057797e5a797eaa7e01877e51cd88545b797e51d28851cc51c6a26951d153798851d3009d686d6d6d6d6d6d51").unwrap());
|
||||||
static DISTRIBUTOR_DEPLOY_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0009d00c852c88852c9529d00cf517f77567f758100ce01207f7551ce01207f75788851cf517f755f84538851cf517f7551ca51ca82770136940120947f7701207f750000537960840100876451cf517f77567f75817b757c51cf577f77587f758177687800a2697600a26952d352d051d0949d587a810000567901208401008764527900a26951c6765479950400e1f50596537a757c6b7c6c765379947b757c53cc5279a26953d1008854cc5379a26954d10088756753d05379950400e1f505967b757c53d0527994777600a06353d3789d53d153ce886753d10088687800a06354d352799d54d153ce886754d100886868547900a06302aa20012057797e5f797eaa7e01877e51cd8851d1587988565551807e5c797e597956799356807e51d28851d3009d55d351d09d55d152ce8802aa20525152807e60797eaa7e01877e55cd8855d200886751d351d09d51d152ce8802aa20012057797e5e797eaa7e01877e51cd8851d20088687600a06302aa2001205b797e5e797eaa7e01877e53cd886753cd016a88687c00a06302aa2001205b797e5d797eaa7e01877e54cd886754cd016a886800cf577f77547f75817651a06300cf517f7500cf517f77567f757e788c54807e00cf5b7f77587f758153799358807e00cf01137f77587f757e00cf011b7f77587f758155799358807e00d28800ce00d18800c700cd8800d000d39d52cf52d28852ce52d18852c752cd88675500cf517f77567f757e00cf5b7f77587f758153799358807e00cf01137f77587f757e00cf011b7f77587f758155799358807e00d28800d158798800d3009d02aa2001205b797e5e797eaa7e01877e00cd8852d100885457790120840100876475536876ce59798876cf517f755f845488756855557a00a063755668c4789e6376d10088c4788b9d686d6d6d6d6d6d6d7551").unwrap());
|
static DISTRIBUTOR_DEPLOY_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0009d00c852c88852c9529d00cf517f77567f758100ce01207f7551ce01207f75788851cf517f755f84538851cf517f7551ca51ca82770136940120947f7701207f750000537960840100876451cf517f77567f75817b757c51cf577f77587f758177687800a2697600a26952d352d051d0949d587a810000567901208401008764527900a26951c6765479950400e1f50596537a757c6b7c6c765379947b757c53cc5279a26953d1008854cc5379a26954d10088756753d05379950400e1f505967b757c53d0527994777600a06353d3789d53d153ce886753d10088687800a06354d352799d54d153ce886754d100886868547900a06302aa20012057797e5f797eaa7e01877e51cd8851d1587988565551807e5c797e597956799356807e51d28851d3009d55d351d09d55d152ce8802aa20525152807e60797eaa7e01877e55cd8855d200886751d351d09d51d152ce8802aa20012057797e5e797eaa7e01877e51cd8851d20088687600a06302aa2001205b797e5e797eaa7e01877e53cd886753cd016a88687c00a06302aa2001205b797e5d797eaa7e01877e54cd886754cd016a886800cf577f77547f75817651a06300cf517f7500cf517f77567f757e788c54807e00cf5b7f77587f758153799358807e00cf01137f77587f757e00cf011b7f77587f758155799358807e00d28800ce00d18800c700cd8800d000d39d52cf52d28852ce52d18852c752cd88675500cf517f77567f757e00cf5b7f77587f758153799358807e00cf01137f77587f757e00cf011b7f77587f758155799358807e00d28800d158798800d3009d02aa2001205b797e5e797eaa7e01877e00cd8852d100885457790120840100876475536876ce59798876cf517f755f845488756855557a00a063755668c4789e6376d10088c4788b9d686d6d6d6d6d6d6d7551").unwrap());
|
||||||
static DISTRIBUTOR_REFUND_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0009d00ce01207f7551ce01207f75788851cf517f755f84538851ca51ca82770136940120947f7701207f7551cf517f75760120840100876451cc51c6a26951d100886751d352d09d51d152ce886802aa200120537a7e55797eaa7e01877e51cd8800cf577f77547f75817651a06300cf517f7500cf517f77567f757e788c54807e00cf5b7f77587f757e00cf01137f77587f757e00cf011b7f77587f757e00d28800ce00d18800c700cd88c4529e6352d10088c4539d686755608500cf517f77567f757e00cf5b7f77587f757e00cf01137f77587f757e00cf011b7f77587f757e00d288527900d18800d3009d02aa20012055797e56797eaa7e01877e00cd8852d100885352790120840100876475526876ce54798876cf517f755f845488c4539e6353d10088c4549d6875686d6d7551").unwrap());
|
static DISTRIBUTOR_REFUND_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0009d00ce01207f7551ce01207f75788851cf517f755f84538851ca51ca82770136940120947f7701207f7551cf517f75760120840100876451cc51c6a26951d100886751d352d09d51d152ce886802aa200120537a7e55797eaa7e01877e51cd8800cf577f77547f75817651a06300cf517f7500cf517f77567f757e788c54807e00cf5b7f77587f757e00cf01137f77587f757e00cf011b7f77587f757e00d28800ce00d18800c700cd88c4529e6352d10088c4539d686755608500cf517f77567f757e00cf5b7f77587f757e00cf01137f77587f757e00cf011b7f77587f757e00d288527900d18800d3009d02aa20012055797e56797eaa7e01877e00cd8852d100885352790120840100876475526876ce54798876cf517f755f845488c4539e6353d10088c4549d6875686d6d7551").unwrap());
|
||||||
static EXECUTION_FEE_PAYOUT_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0ce00ce01207f758800cf517f755f84528800cf577f77547f758151a169c0cf517f7701207f7502aa2001207b7e7b7eaa7e01877e52cd8852ccc0c6a2").unwrap());
|
static EXECUTION_FEE_PAYOUT_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0ce00ce01207f758800cf517f755f84528800cf577f77547f758151a169c0cf517f7701207f7502aa2001207b7e7b7eaa7e01877e52cd8852ccc0c6a2").unwrap());
|
||||||
static OFFERING_INITIATOR_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0c9009dc0c85a79c8885979c9567a9d5879ce827701209d557900a263c0c85a79c8885979c956799d68c0c800d1788800d2578800d3009d00cd597a88c08bc0c878c88876c9547a9d76ca827778ca7853947f77527f75817bca7b53945279947f777c7f75c05293c0c878c88876c9557a9d76ca827778ca7853947f77527f75817bca7b53945279947f777c7f75c05393c0c878c88876c9567a9d76ca827778ca7853947f77527f75815178529302ff00a063755367785293014ba063755268685379ca537a5394537a947b947f7702aa20525352807e5a797e7b7eaa7e01877e54cd8854cc7cc6a26954d10088c05493c0c878c88876c9567a9d76ca827778ca7853947f77527f75815178529302ff00a063755367785293014ba063755268685379ca537a5394537a947b947f7702aa20525352807e59797e7b7eaa7e01877e55cd8855cc7cc6a26955d100885679d07600a0690100557a7e04000000007e51d28851d15479527e8851d3789d51cd02aa20547aaa7e01877e885153d28853d153798853d3009d53cd02aa20537aaa7e01877e8802aa20525352807e557a7eaa7e01877e52cd8852cc5479c6a26952d1547ace8852d39d52d2008856d100876456d101207f75788791696856cd567f75066a0442434d52879169c4579e6357d100876457d101207f75788791696857cd567f75066a0442434d52879169c4589e6358d100876458d101207f75788791696858cd567f75066a0442434d52879169c4599e6359d100876459d101207f75788791696859cd567f75066a0442434d52879169c45a9e635ad10087645ad101207f7578879169685acd567f75066a0442434d52879169c45b9d686868686d7551").unwrap());
|
static OFFERING_INITIATOR_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0c9009dc0c85b79c8885a79c9577a9d5979ce827701209d567900a263c0c85b79c8885a79c957799d68c0c800d1788800d2578800d3009d00cd5a7a88c08bc0c878c88876c9547a9d76ca827778ca7853947f77527f75817bca7b53945279947f777c7f75c05293c0c878c88876c9557a9d76ca827778ca7853947f77527f75817bca7b53945279947f777c7f75c05393c0c878c88876c9567a9d76ca827778ca7853947f77527f75815178529302ff00a063755367785293014ba063755268685379ca537a5394537a947b947f7702aa20525352807e5b797e7b7eaa7e01877e54cd8854cc7cc6a26954d10088c05493c0c878c88876c9567a9d76ca827778ca7853947f77527f75815178529302ff00a063755367785293014ba063755268685379ca537a5394537a947b947f7702aa20525352807e5a797e7b7eaa7e01877e55cd8855cc7cc6a26955d100885779d07600a0690100557a7e04000000007e51d28851d15479527e8851d3789d51cd02aa20547aaa7e01877e885153d28853d153798853d3009d53cd02aa20537aaa7e01877e8802aa20525352807e567a7eaa7e01877e52cd8852cc5579c6a26952d1557ace8852d39d52d20088c05593c0c878c88876c9537a9d76c7827778c77853947f77527f75817bc77b53945279947f777c7f7576827700a0766378517f75016a8777686356cd78886756cd016a886856d1008857d100876457d101207f7552798791696857cd567f75066a0442434d52879169c4589e6358d100876458d101207f7552798791696858cd567f75066a0442434d52879169c4599e6359d100876459d101207f7552798791696859cd567f75066a0442434d52879169c45a9e635ad10087645ad101207f755279879169685acd567f75066a0442434d52879169c45b9e635bd10087645bd101207f755279879169685bcd567f75066a0442434d52879169c45c9d686868686d6d51").unwrap());
|
||||||
static OFFERING_INTEGRATED_TIMELOCKED_P2NFTH_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0cf527f7701207f75c0cf01227f77815479ce01207f757b88537acf567f75817600a0699f6978ce7bcf7eaa88c0cf517f77517f7581c0c85279c8887cc99c").unwrap());
|
static OFFERING_INTEGRATED_TIMELOCKED_P2NFTH_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0cf527f7701207f75c0cf01227f77815479ce01207f757b88537acf567f75817600a0699f6978ce7bcf7eaa88c0cf517f77517f7581c0c85279c8887cc99c").unwrap());
|
||||||
|
|
||||||
static IDO_INITIATOR_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0ce827701209dc0cf827700a0695579827701209dc0c85779c8885679c99dc0c85779c8885679c99d5479529376ca827778ca7853947f77527f75817bca7b53945279947f777c7f75517f7701207f75c0cec0cf7eaa88547ac852d1827701209d52d300a06902aa2053798277518054797e5379827751807e537a7e01207e7b7e01207e52d17e01207e547a7e587e52d358807e537a7eaa7e01877e56cd8856ccc0c6a26956d1c0ce8856d2c0cf8856d3c0d09d02aa20525652807e7b7eaa7e01877e7657cd8857cc02e803a26957d1008858cd8858cc78c6a26958d178ce8858d278cf8858d37cd09c").unwrap());
|
static IDO_INITIATOR_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0ce827701209dc0cf827700a0695579827701209dc0c85779c8885679c99dc0c85779c8885679c99d5479529376ca827778ca7853947f77527f75817bca7b53945279947f777c7f7501157f7701207f75c0cec0cf7eaa88547ac852d1827701209d52d300a06902aa20c101147f755479827751807e54797e5379827751807e537a7e01207e7b7e01207e52d17e01207e547a7e587e52d358807e537a7eaa7e01877e57cd8857ccc0c6a26957d1c0ce8857d2c0cf8857d3c0d09d02aa20525752807e7b7eaa7e01877e7658cd8858cc02e803a26958d1008859cd8859cc78c6a26959d178ce8859d278cf8859d37cd09c").unwrap());
|
||||||
static IDO_POSTLAUNCH_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("5879009c63c0009dc0c9009e69c0cdc0c788c0ccc0c6a269c0d1c0ce88c0d3c0d09dc0d2c0cf8802aa20520052807e597a7eaa7e01877ec0c851c88851c9579d7651cd8851cc51c6a26951d151ce8851d351d09dc0c852c88852c9589d52cd8852cc52c6a26952d152ce8852d352d09d53d10088c4549d6d6d6d6d51675879519c63c0009dc0c9009dc0cdc0c788c0d1c0ce88c0d3c0d09dc0d2c0cf88c0c852c88852c9529d52cd52c78852cc52c6a26952d152ce8852d352d09d02aa200120c0cec0cf7eaa7e587a7eaa7e01877e00005376c75479876376ce59798763527978d093537a757c6b7c6c6776ce0088686ec6937b757c6776ce008868768bc378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c3789d6868686868686868c0ccc0c6547a93a269c0c851c88851c9519d51cd51c78851cc51c6a26951d0537a937600a06351d159798851d378a26951d200886751d100886853d10088c4549d6d6d6d6d6d6d5167587a529dc0009dc0c9009d5379827701209d5879ce567a885779cf517f755f845588c0c65879cf577f77587f7581a269c0c851c88851c9519d5779cf5f7f77587f75817600a06351d078a2696851d000a06351ce5679886851cf0088c0c852c88852c9529d52ce56798800005a79cf517f75608401008763557981537994765679950400e1f505967652d0a06352d07768765679950500e8764817965d79cf01177f77587f758194760500e8764817955779967802e803a27800a09a6378567a757c6b7c6b7c6b7c6b7c6c6c6c6c765379a16376557a757c6b7c6b7c6b7c6c6c6c675279557a757c6b7c6b7c6b7c6c6c6c68686d6d68c0c651c69352c69352799451d052d0935279945100557900a0557900a09a63537b75775202aa2005746376a914000114807e2b88ac67c0d1c0ce88c25288c0cdc0c788c0c6c0d095c0c6c0cc9490539502e80396c0cc7c94c0d3957ca2687eaa7e01877e00cd8800cc56799d00d15c798800d355799d00d20088096a0653554d4d4f4e14000114807e51cd8851cc009d51d100886802aa2001205c7a7e5d7a7eaa7e01877e78cd8876cc547aa269527900a06376d35379a26976d15a798876d200886776d100886878d10088c47b8b9d6d6d6d6d6d75516868").unwrap());
|
static IDO_POSTLAUNCH_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("5879009c63c0009dc0c9009e69c0cdc0c788c0ccc0c6a269c0d1c0ce88c0d3c0d09dc0d2c0cf8802aa20520052807e597a7eaa7e01877ec0c851c88851c9589d7651cd8851cc51c6a26951d151ce8851d351d09dc0c852c88852c9599d52cd8852cc52c6a26952d152ce8852d352d09dc353a06353ce0088c3549d6853d10088c4549d6d6d6d6d51675879519c63c0009dc0c9009dc0cdc0c788c0d1c0ce88c0d3c0d09dc0d2c0cf88c0c852c88852c9529d52cd52c78852cc52c6a26952d152ce8852d352d09d02aa200120c0cec0cf7eaa7e587a7eaa7e01877e00005376c75479876376ce59798763527978d093537a757c6b7c6c6776ce0088686ec6937b757c6776ce008868768bc378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c378a06376c75579876376ce5a798763537978d093547a757c6b7c6b7c6c6c6776ce008868527978c693537a757c6b7c6c6776ce008868768b77c3789d6868686868686868c0ccc0c6547a93a269c0c851c88851c9519d51cd51c78851cc51c6a26951d0537a937600a06351d159798851d378a26951d200886751d100886853d10088c4549d6d6d6d6d6d6d5167587a529dc0009dc0c9009d5379827701209d53ce567a8853cf517f755f845588c0c653cf577f77587f7581a269c0c851c88851c9519d53cf5f7f77587f75817600a06351d078a2696851d000a06351ce5679886851cf0088c0c852c88852c9529d52ce567988000053cf517f75608401008763557981537994765679950400e1f505967652d0a06352d07768765679950500e87648179653cf01177f77587f758194760500e8764817955779967802e803a27800a09a6378567a757c6b7c6b7c6b7c6b7c6c6c6c6c765379a16376557a757c6b7c6b7c6b7c6c6c6c675279557a757c6b7c6b7c6b7c6c6c6c68686d6d68c0c651c69352c69352799451d052d093527994537900a0537900a09a6302aa2005746376a914000114807e2b88ac67c0d1c0ce88c25288c0cdc0c788c0c6c0d095c0c6c0cc9490539502e80396c0cc7c94c0d3957ca2687eaa7e01877e00cd8800cc54799d00d15a798800d353799d00d20088096a0653554d4d4f4e14000114807e51cd8851cc009d51d100886700d1008800cd016a8851d1008851cd016a886802aa2001205a7a7e5b7a7eaa7e01877e52cd8852cc7ba2697600a06352d378a26952d158798852d200886752d100886853d10088c4549d6d6d6d6d75516868").unwrap());
|
||||||
static IDO_PREINIT_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0519dc0c800c88800c9529dc0c852c88852c9539dc0c853c88853c9549dc0c854c88854c9559dc0c855c88855c9569dc0c856c88856c9579d5979009e63c0c857c88857c9589d68567981009c5a79009c9b587981009c9b63c0d1008852cd00c78852d1008853cd52c78853d1008854cd53c78854d1008855cd54c78855d1008856cd55c78856d1008857cd56c78857d100885979009e6358cd57c78858cc57c6a26958d157ce8858d357d09d58d257cf886802aa200302010055797eaa7e01877ec101447f77587981009c6301005c79009e63015177685b79009c6300cd53798800d10088760251207e5b797e01207e5a797e52797e7b757c6757585e79009e63587b75775968c0c85279c88878c9009d00cd016a8800d1008876cd5b798876d1c0c88876d3009d76d2010088768bd10088c47852939d52790200207e5d797e01207ec0c87e54797e547a757c6b7c6b7c6c6c6d6875675b79009c635a79009c6300cd52798800d10088030051205a797e01207e59797e787e7767c0c857c88857c9009d53795579935379789454795279a06900cd02a91401205d797e5b797ea97e01877e8800d1c0c88800d3789d00d2008858cd54798858d1c0c88858d352799d58d2008859d10088c45a9d035100205c797e01207e5b797e53797e537a757c6b7c6c6d68675a79009c6300cd52798800d10088035151205a797e01207e59797e787e7767c0c858c88858c9009d00cd016a8800d1008859cd52798859d1c0c88859d3009d59d201ff885ad10088c45b9d03510020c0c87e01207e59797e787e77686868c0cd02aa205279aa7e01877e886d67c0c858c88858c9599d55ca827755ca7853947f77527f758155ca527953945279947f77787f7502a91401205b797e59797ea97e01877e00cd02aa20011753797e54797eaa7e01877e8800d1008800ca827700ca7853947f77527f75815178529302ff00a063755367785293014ba0637552686800ca537953945379945279947f7702aa20030200005d797e52797eaa7e01877e51cd8851d1008852ca827752ca7853947f77527f75815178529302ff00a063755367785293014ba0637552686852ca537953945379945279947f7702aa20030200000111797e707c7f757e01207e01157901ff7eaa7e707c0121937f777eaa7e01877e52cd8852d1008853ca827753ca7853947f77527f75815178529302ff00a063755367785293014ba0637552686853ca537953945379945279947f7702aa20030200000115797e52797eaa7e01877e53cd8853d1008854ca827754ca7853947f77527f75815178529302ff00a063755367785293014ba0637552686854ca537953945379945279947f7702aa20030200000119797e52797eaa7e01877e54cd8854d1008802aa20030200000119797eaa7e01877e55cd8855cc57c6a26955d157ce8855d30116799d55d2008856ca827756ca7853947f77527f758156ca527953945279947f77787f7556cd02aa20012001207901007eaa7e53797eaa7e01877e8856cc58c6a26956d158ce8856d358d09d56d258cf8802aa20525652807e011c797eaa7e01877e57cd8857d157ce8857d357d0011a79949d57d200886d6d6d6d6d6d6d6d6d6d6d75686d6d6d6d6d51").unwrap());
|
static IDO_PREINIT_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("c0519dc0c800c88800c9529dc0c852c88852c9539dc0c853c88853c9549dc0c854c88854c9559dc0c855c88855c9569dc0c856c88856c9579d5979009e63c0c858c88858c9599d67c0c858c88858c9599d68c0c857c88857c9589d567981009c5a79009c9b587981009c9b63c0d1008852cd00c78852d1008853cd52c78853d1008854cd53c78854d1008855cd54c78855d1008856cd55c78856d1008857cd56c78857d100885979009e6359cd58c78859cc58c6a26959d158ce8859d358d09d59d258cf8867567981009e5979009e9a6459cd58c78859d10088686858cd57c78858d1008802aa200302010055797eaa7e01877ec101587f77587981009c6301005c79009e63015177685b79009c6300cd53798800d10088760251207e5b797e01207e5a797e52797e7b757c67c0c859c88859c9009d00cd016a8800d100885acd5979885ad1c0c8885ad3009d5ad20100885bd10088c45c9d760200207e5b797e01207ec0c87e52797e7b757c6875675b79009c635a79009c6300cd52798800d10088030051205a797e01207e59797e787e7767c0c859c88859c9009d53795579950400e1f50596547978935479789455795279a06900cd02a91401205e797e5c797ea97e01877e8800d1c0c88800d3789d00d2008859cd55798859d1c0c88859d352799d59d2008858c7827758c77853947f77527f758158c7527953945279947f77787f7576827700a0766378517f75016a87776876635acd527988675acd016a88685ad100885bd10088c45c9d035100200111797e01207e60797e58797e587a757c6b7c6b7c6b7c6b7c6b7c6b7c6c6c6c6c6c6c6d6d6d7568675a79009c6300cd52798800d10088035151205a797e01207e59797e787e7767c0c859c88859c9009d00cd016a8800d100885acd5279885ad1c0c8885ad3009d5ad201ff885bd10088c45c9d03510020c0c87e01207e59797e787e7768686802aa20c101147f7552797eaa7e01877ec0cd886d67c0c859c88859c95a9d55ca827755ca7853947f77527f758155ca527953945279947f77787f7502a91401205b797e59797ea97e01877e00cd02aa20c101147f7501177e53797e54797eaa7e01877e8800d1008800ca827700ca7853947f77527f75815178529302ff00a063755367785293014ba0637552686800ca537953945379945279947f7702aa20030200005d797e52797eaa7e01877e51cd8851d1008852ca827752ca7853947f77527f75815178529302ff00a063755367785293014ba0637552686852ca537953945379945279947f7702aa20030200000111797e707c0114937f757e01207e01157901ff7eaa7e707c0135937f777eaa7e01877e52cd8852d1008853ca827753ca7853947f77527f75815178529302ff00a063755367785293014ba0637552686853ca537953945379945279947f7702aa20030200000115797e52797eaa7e01877e53cd8853d1008854ca827754ca7853947f77527f75815178529302ff00a063755367785293014ba0637552686854ca537953945379945279947f7702aa20030200000119797e52797eaa7e01877e54cd8854d1008857c7827757c77853947f77527f75815178529302ff00a063755367785293014ba0637552686857c7537953945379945279947f7755cd03020000011d797e52797e8855d1008802aa2003020000011d797eaa7e01877e56cd8856cc58c6a26956d158ce8856d3011a799d56d2008856ca827756ca7853947f77527f758156ca527953945279947f77787f7557cd02aa20c101147f7501207e01247901007eaa7e53797eaa7e01877e8857cc59c6a26957d159ce8857d359d09d57d259cf8802aa20525752807e0120797eaa7e01877e58cd8858d158ce8858d358d0011e79949d58d200886d6d6d6d6d6d6d6d6d6d6d6d6d75686d6d6d6d6d51").unwrap());
|
||||||
|
|
||||||
static STORAGE_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("8178c99dc8c0c887").unwrap());
|
static STORAGE_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("8178c99dc8c0c887").unwrap());
|
||||||
static P2NFTH_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("78ce7bcf7eaa87").unwrap());
|
static P2NFTH_CONTRACT: LazyLock<Vec<u8>> = LazyLock::new(|| hex::decode("78ce7bcf7eaa87").unwrap());
|
||||||
|
|
@ -261,7 +261,7 @@ fn build_storage_script_with_data(governingOutpointIndex: u32, data: &[u8]) -> S
|
||||||
Script::from(bytes)
|
Script::from(bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extract_data_from_unlocking_bytecode_of_storage_with_data(unlocking_bytecode: Script) -> Result<Vec<u8>> {
|
fn extract_data_from_unlocking_bytecode_of_storage_with_data_with_size(unlocking_bytecode: Script) -> Result<Vec<u8>> {
|
||||||
let instructions: Vec<_> = unlocking_bytecode.instructions().collect();
|
let instructions: Vec<_> = unlocking_bytecode.instructions().collect();
|
||||||
if instructions.len() != 2 {
|
if instructions.len() != 2 {
|
||||||
return Err(anyhow::anyhow!("not a storage unlocking bytecode, should have only two push opcodes"));
|
return Err(anyhow::anyhow!("not a storage unlocking bytecode, should have only two push opcodes"));
|
||||||
|
|
@ -275,7 +275,7 @@ fn extract_data_from_unlocking_bytecode_of_storage_with_data(unlocking_bytecode:
|
||||||
return Err(anyhow::anyhow!("storage with data should have at least two instructions"));
|
return Err(anyhow::anyhow!("storage with data should have at least two instructions"));
|
||||||
}
|
}
|
||||||
match &redeem_inst_list[n - 2] {
|
match &redeem_inst_list[n - 2] {
|
||||||
Ok(Instruction::PushBytes(data)) => Ok(data.to_vec()),
|
Ok(Instruction::PushBytes(data)) => Ok(data[0..data.len()-2].to_vec()),
|
||||||
_ => Err(anyhow::anyhow!("storage with data should have a push opcode at instructions[count - 2]")),
|
_ => Err(anyhow::anyhow!("storage with data should have a push opcode at instructions[count - 2]")),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -336,13 +336,14 @@ fn build_launcher_bytecode(collectorNFTH: &[u8], platformFeeNFTH: &[u8], platfor
|
||||||
bytecode
|
bytecode
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_partial_offering_initiator_bytecode(extensionOutpointIndex: &BigInt, tokenStorageOutpointIndex: &BigInt, distRefundOutpointIndex: &BigInt, distDeployOutpointIndex: &BigInt, launcherBytecodeOutpointIndex: &BigInt, offeringBytecodeOutpointIndex: &BigInt, executionFee: &BigInt) -> Vec<u8> {
|
fn build_partial_offering_initiator_bytecode(extensionOutpointIndex: &BigInt, tokenStorageOutpointIndex: &BigInt, offeringBcmrStorageOutpointIndex: &BigInt, distRefundOutpointIndex: &BigInt, distDeployOutpointIndex: &BigInt, launcherBytecodeOutpointIndex: &BigInt, offeringBytecodeOutpointIndex: &BigInt, executionFee: &BigInt) -> Vec<u8> {
|
||||||
let mut bytecode = Builder::new()
|
let mut bytecode = Builder::new()
|
||||||
.push_slice(&STORAGE_CONTRACT)
|
.push_slice(&STORAGE_CONTRACT)
|
||||||
.into_script()
|
.into_script()
|
||||||
.to_bytes();
|
.to_bytes();
|
||||||
bytecode.extend_from_slice(&bigint_to_push_opcode(extensionOutpointIndex));
|
bytecode.extend_from_slice(&bigint_to_push_opcode(extensionOutpointIndex));
|
||||||
bytecode.extend_from_slice(&bigint_to_push_opcode(tokenStorageOutpointIndex));
|
bytecode.extend_from_slice(&bigint_to_push_opcode(tokenStorageOutpointIndex));
|
||||||
|
bytecode.extend_from_slice(&bigint_to_push_opcode(offeringBcmrStorageOutpointIndex));
|
||||||
bytecode.extend_from_slice(&bigint_to_push_opcode(distRefundOutpointIndex));
|
bytecode.extend_from_slice(&bigint_to_push_opcode(distRefundOutpointIndex));
|
||||||
bytecode.extend_from_slice(&bigint_to_push_opcode(distDeployOutpointIndex));
|
bytecode.extend_from_slice(&bigint_to_push_opcode(distDeployOutpointIndex));
|
||||||
bytecode.extend_from_slice(&bigint_to_push_opcode(launcherBytecodeOutpointIndex));
|
bytecode.extend_from_slice(&bigint_to_push_opcode(launcherBytecodeOutpointIndex));
|
||||||
|
|
@ -1014,8 +1015,9 @@ async fn create_ido_context_from_preinit(network: Option<Network>, tx: &Transact
|
||||||
&build_storage_script_with_data(
|
&build_storage_script_with_data(
|
||||||
1,
|
1,
|
||||||
&build_partial_offering_initiator_bytecode(
|
&build_partial_offering_initiator_bytecode(
|
||||||
&BigInt::from(6i64), // extensionOutpointIndex
|
&BigInt::from(7i64), // extensionOutpointIndex
|
||||||
&BigInt::from(5i64), // tokenStorageOutpointIndex
|
&BigInt::from(6i64), // tokenStorageOutpointIndex
|
||||||
|
&BigInt::from(5i64), // offeringBcmrStorageOutpointIndex
|
||||||
&BigInt::from(4i64), // distRefundOutpointIndex
|
&BigInt::from(4i64), // distRefundOutpointIndex
|
||||||
&BigInt::from(3i64), // distDeployOutpointIndex
|
&BigInt::from(3i64), // distDeployOutpointIndex
|
||||||
&BigInt::from(2i64), // launcherBytecodeOutpointIndex
|
&BigInt::from(2i64), // launcherBytecodeOutpointIndex
|
||||||
|
|
@ -1047,11 +1049,13 @@ async fn create_ido_context_from_preinit(network: Option<Network>, tx: &Transact
|
||||||
return Err(anyhow::anyhow!("ido initiator bytecode storage does not match!"));
|
return Err(anyhow::anyhow!("ido initiator bytecode storage does not match!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// skip validating offering & oToken bcmr
|
||||||
|
|
||||||
let mut offered_token_id: Option<Vec<u8>> = None;
|
let mut offered_token_id: Option<Vec<u8>> = None;
|
||||||
|
|
||||||
if offered_token_is_in_supply {
|
if offered_token_is_in_supply {
|
||||||
// verify offered token storage
|
// verify offered token storage
|
||||||
let offeredTokenStorageOut = tx.output.get(8);
|
let offeredTokenStorageOut = tx.output.get(9);
|
||||||
if offeredTokenStorageOut.is_none() {
|
if offeredTokenStorageOut.is_none() {
|
||||||
// valid = false;
|
// valid = false;
|
||||||
return Err(anyhow::anyhow!("offered token supply not found!"));
|
return Err(anyhow::anyhow!("offered token supply not found!"));
|
||||||
|
|
@ -1254,7 +1258,7 @@ fn ido_add_tx(
|
||||||
updates.push(IdoUpdate::Status("ACTIVE".to_string()));
|
updates.push(IdoUpdate::Status("ACTIVE".to_string()));
|
||||||
updates.push(IdoUpdate::InitTxId(tx.txid().to_blob()));
|
updates.push(IdoUpdate::InitTxId(tx.txid().to_blob()));
|
||||||
let launcherBytecodeIn = tx.input.get(2).ok_or_else(|| anyhow::anyhow!("launcher bytecode storage does not exist!"))?;
|
let launcherBytecodeIn = tx.input.get(2).ok_or_else(|| anyhow::anyhow!("launcher bytecode storage does not exist!"))?;
|
||||||
let launcher_data = extract_data_from_unlocking_bytecode_of_storage_with_data(launcherBytecodeIn.script_sig.clone()).map_err(|e| anyhow::anyhow!("failed to extract launcher bytecode: {e}"))?;
|
let launcher_data = extract_data_from_unlocking_bytecode_of_storage_with_data_with_size(launcherBytecodeIn.script_sig.clone()).map_err(|e| anyhow::anyhow!("failed to extract launcher bytecode: {e}"))?;
|
||||||
let launcher_script = Script::from(launcher_data);
|
let launcher_script = Script::from(launcher_data);
|
||||||
let launcher_inst_list: Vec<_> = launcher_script.instructions().collect();
|
let launcher_inst_list: Vec<_> = launcher_script.instructions().collect();
|
||||||
let collectorNFTH: Vec<u8>;
|
let collectorNFTH: Vec<u8>;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue