From cd8589e86a37e1e81721f7d2e02f5f7de9272e6f Mon Sep 17 00:00:00 2001 From: ibrizsabin Date: Fri, 3 May 2024 13:17:03 +0545 Subject: [PATCH] fix: add protocols in ticket --- contracts/sui/xcall/sources/main.move | 1 + contracts/sui/xcall/sources/types/execute_ticket.move | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/contracts/sui/xcall/sources/main.move b/contracts/sui/xcall/sources/main.move index 8f33c268c..0e8346953 100644 --- a/contracts/sui/xcall/sources/main.move +++ b/contracts/sui/xcall/sources/main.move @@ -424,6 +424,7 @@ module xcall::main { xcall_state::get_id_cap_id(cap), request_id, from, + protocols, data, ); ticket diff --git a/contracts/sui/xcall/sources/types/execute_ticket.move b/contracts/sui/xcall/sources/types/execute_ticket.move index 8e80c1478..a45f12c12 100644 --- a/contracts/sui/xcall/sources/types/execute_ticket.move +++ b/contracts/sui/xcall/sources/types/execute_ticket.move @@ -1,17 +1,20 @@ module xcall::execute_ticket { use xcall::network_address::{NetworkAddress}; + use std::string::{String}; public struct ExecuteTicket { dapp_id:ID, request_id:u128, from:NetworkAddress, + protocols:vector, message:vector, } - public(package) fun new(dapp_id:ID,request_id:u128,from:NetworkAddress,message:vector):ExecuteTicket{ + public(package) fun new(dapp_id:ID,request_id:u128,from:NetworkAddress,protocols:vector,message:vector):ExecuteTicket{ ExecuteTicket { dapp_id, request_id, + protocols, from, message, } @@ -19,7 +22,7 @@ module xcall::execute_ticket { } public(package) fun consume(self:ExecuteTicket){ - let ExecuteTicket { dapp_id, request_id,from,message}=self; + let ExecuteTicket { dapp_id, request_id,from,message,protocols}=self; } public fun message(self:&ExecuteTicket):vector{ self.message @@ -37,4 +40,8 @@ module xcall::execute_ticket { self.dapp_id } + public fun protocols(self:&ExecuteTicket):vector{ + self.protocols + } + } \ No newline at end of file