Command property

BcsType<Map<String, dynamic>, dynamic> Command
final

Implementation

static final Command = Bcs.enumeration('Command', {
  'MoveCall': ProgrammableMoveCall,
  'TransferObjects': Bcs.struct('TransferObjects', {
    'objects': Bcs.vector(Argument),
    'address': Argument,
  }),
  'SplitCoins': Bcs.struct('SplitCoins', {
    'coin': Argument,
    'amounts': Bcs.vector(Argument),
  }),
  'MergeCoins': Bcs.struct('MergeCoins', {
    'destination': Argument,
    'sources': Bcs.vector(Argument),
  }),
  'Publish': Bcs.struct('Publish', {
    'modules': Bcs.vector(
      Bcs.vector(Bcs.u8()).transform(
        input: (dynamic val) => val is String ? fromB64(val) : val,
        output: (List<int> val) => toB64(Uint8List.fromList(val)),
      ),
    ),
    'dependencies': Bcs.vector(Address),
  }),
  'MakeMoveVec': Bcs.struct('MakeMoveVec', {
    'type': OptionEnum(TypeTag).transform(
      input: (dynamic val) =>
        val == null ? {'None': true} : {'Some': val},
      output: (Map<String, dynamic> val) => val['Some'],
    ),
    'elements': Bcs.vector(Argument),
  }),
  'Upgrade': Bcs.struct('Upgrade', {
    'modules': Bcs.vector(
      Bcs.vector(Bcs.u8()).transform(
        input: (dynamic val) => val is String ? fromB64(val) : val,
        output: (List<int> val) => toB64(Uint8List.fromList(val)),
      ),
    ),
    'dependencies': Bcs.vector(Address),
    'package': Address,
    'ticket': Argument,
  }),
});