Skip to content

Commit

Permalink
chore: add operators struct (#105)
Browse files Browse the repository at this point in the history
Co-authored-by: Milap Sheth <milap@interoplabs.io>
  • Loading branch information
npty and milapsheth authored Aug 21, 2024
1 parent b351d5f commit fd297c7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/nice-dodos-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@axelar-network/axelar-cgp-sui': patch
---

Added Bag and Operator bcs structs
14 changes: 14 additions & 0 deletions src/bcs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { bcs } from '@mysten/sui/bcs';
import { UID } from './types';

function getAxelarStructs() {
const Bytes32 = bcs.Address;
Expand Down Expand Up @@ -63,6 +64,17 @@ function getAxelarStructs() {
data: bcs.vector(bcs.U8),
});

const Bag = bcs.struct('Bag', {
id: UID,
size: bcs.U64,
});

const Operators = bcs.struct('Operators', {
id: UID,
operators: bcs.vector(bcs.Address),
caps: Bag,
});

return {
Bytes32,
Message,
Expand All @@ -75,6 +87,8 @@ function getAxelarStructs() {
MoveCall,
Transaction,
EncodedMessage,
Bag,
Operators,
};
}

Expand Down

0 comments on commit fd297c7

Please sign in to comment.