@@ -24,11 +24,10 @@ use unionlabs_cosmwasm_upgradable::UpgradeMsg;
2424
2525use crate :: {
2626 com:: {
27- decode_fungible_asset, Ack , Batch , BatchAck , Forward , FungibleAssetOrder ,
28- FungibleAssetOrderAck , Instruction , Multiplex , ZkgmPacket , ACK_ERR_ONLY_MAKER ,
29- FILL_TYPE_MARKETMAKER , FILL_TYPE_PROTOCOL , FORWARD_SALT_MAGIC , INSTR_VERSION_0 ,
30- INSTR_VERSION_1 , OP_BATCH , OP_FORWARD , OP_FUNGIBLE_ASSET_ORDER , OP_MULTIPLEX ,
31- TAG_ACK_FAILURE , TAG_ACK_SUCCESS ,
27+ Ack , Batch , BatchAck , Forward , FungibleAssetOrder , FungibleAssetOrderAck , Instruction ,
28+ Multiplex , ZkgmPacket , ACK_ERR_ONLY_MAKER , FILL_TYPE_MARKETMAKER , FILL_TYPE_PROTOCOL ,
29+ FORWARD_SALT_MAGIC , INSTR_VERSION_0 , OP_BATCH , OP_FORWARD , OP_FUNGIBLE_ASSET_ORDER ,
30+ OP_MULTIPLEX , TAG_ACK_FAILURE , TAG_ACK_SUCCESS ,
3231 } ,
3332 msg:: { EurekaMsg , ExecuteMsg , InitMsg , PredictWrappedTokenResponse , QueryMsg } ,
3433 state:: {
@@ -314,12 +313,12 @@ fn timeout_internal(
314313) -> Result < Response , ContractError > {
315314 match instruction. opcode {
316315 OP_FUNGIBLE_ASSET_ORDER => {
317- if instruction. version > INSTR_VERSION_1 {
316+ if instruction. version > INSTR_VERSION_0 {
318317 return Err ( ContractError :: UnsupportedVersion {
319318 version : instruction. version ,
320319 } ) ;
321320 }
322- let order = decode_fungible_asset ( & instruction) ?;
321+ let order = FungibleAssetOrder :: abi_decode_params ( & instruction. operand , true ) ?;
323322 refund ( deps, path, packet. source_channel_id , order)
324323 }
325324 OP_BATCH => {
@@ -477,12 +476,12 @@ fn acknowledge_internal(
477476) -> Result < Response , ContractError > {
478477 match instruction. opcode {
479478 OP_FUNGIBLE_ASSET_ORDER => {
480- if instruction. version > INSTR_VERSION_1 {
479+ if instruction. version > INSTR_VERSION_0 {
481480 return Err ( ContractError :: UnsupportedVersion {
482481 version : instruction. version ,
483482 } ) ;
484483 }
485- let order = decode_fungible_asset ( & instruction) ?;
484+ let order = FungibleAssetOrder :: abi_decode_params ( & instruction. operand , true ) ?;
486485 let order_ack = if successful {
487486 Some ( FungibleAssetOrderAck :: abi_decode_params ( & ack, true ) ?)
488487 } else {
@@ -764,12 +763,12 @@ fn execute_internal(
764763) -> Result < Response , ContractError > {
765764 match instruction. opcode {
766765 OP_FUNGIBLE_ASSET_ORDER => {
767- if instruction. version > INSTR_VERSION_1 {
766+ if instruction. version > INSTR_VERSION_0 {
768767 return Err ( ContractError :: UnsupportedVersion {
769768 version : instruction. version ,
770769 } ) ;
771770 }
772- let order = decode_fungible_asset ( & instruction) ?;
771+ let order = FungibleAssetOrder :: abi_decode_params ( & instruction. operand , true ) ?;
773772 execute_fungible_asset_order (
774773 deps,
775774 env,
@@ -1424,12 +1423,12 @@ pub fn verify_internal(
14241423) -> Result < ( ) , ContractError > {
14251424 match instruction. opcode {
14261425 OP_FUNGIBLE_ASSET_ORDER => {
1427- if instruction. version != INSTR_VERSION_1 {
1426+ if instruction. version != INSTR_VERSION_0 {
14281427 return Err ( ContractError :: UnsupportedVersion {
14291428 version : instruction. version ,
14301429 } ) ;
14311430 }
1432- let order = decode_fungible_asset ( instruction) ?;
1431+ let order = FungibleAssetOrder :: abi_decode_params ( & instruction. operand , true ) ?;
14331432 verify_fungible_asset_order ( deps, info, channel_id, path, & order, response)
14341433 }
14351434 OP_BATCH => {
@@ -1779,7 +1778,7 @@ fn transfer(
17791778 salt : salt. into ( ) ,
17801779 path : U256 :: ZERO ,
17811780 instruction : Instruction {
1782- version : INSTR_VERSION_1 ,
1781+ version : INSTR_VERSION_0 ,
17831782 opcode : OP_FUNGIBLE_ASSET_ORDER ,
17841783 operand : FungibleAssetOrder {
17851784 sender : info. sender . as_bytes ( ) . to_vec ( ) . into ( ) ,
0 commit comments