Skip to content

Commit

Permalink
fix: add protocols in ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrizsabin authored and Itshyphen committed Aug 8, 2024
1 parent 8512749 commit cd8589e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions contracts/sui/xcall/sources/main.move
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ module xcall::main {
xcall_state::get_id_cap_id(cap),
request_id,
from,
protocols,
data,
);
ticket
Expand Down
11 changes: 9 additions & 2 deletions contracts/sui/xcall/sources/types/execute_ticket.move
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
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<String>,
message:vector<u8>,
}

public(package) fun new(dapp_id:ID,request_id:u128,from:NetworkAddress,message:vector<u8>):ExecuteTicket{
public(package) fun new(dapp_id:ID,request_id:u128,from:NetworkAddress,protocols:vector<String>,message:vector<u8>):ExecuteTicket{
ExecuteTicket {
dapp_id,
request_id,
protocols,
from,
message,
}

}

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<u8>{
self.message
Expand All @@ -37,4 +40,8 @@ module xcall::execute_ticket {
self.dapp_id
}

public fun protocols(self:&ExecuteTicket):vector<String>{
self.protocols
}

}

0 comments on commit cd8589e

Please sign in to comment.