@@ -1102,4 +1102,113 @@ def __init__(self, *args, **kwargs):
11021102 )
11031103
11041104
1105+ class Liquidity_pool_create (GrapheneObject ):
1106+ def __init__ (self , * args , ** kwargs ):
1107+ if isArgsThisClass (self , args ):
1108+ self .data = args [0 ].data
1109+ else :
1110+ if len (args ) == 1 and len (kwargs ) == 0 :
1111+ kwargs = args [0 ]
1112+
1113+ super ().__init__ (
1114+ OrderedDict (
1115+ [
1116+ ("fee" , Asset (kwargs ["fee" ])),
1117+ ("account" , ObjectId (kwargs ["account" ], "account" )),
1118+ ("asset_a" , ObjectId (kwargs ["asset_a" ], "asset" )),
1119+ ("asset_b" , ObjectId (kwargs ["asset_b" ], "asset" )),
1120+ ("share_asset" , ObjectId (kwargs ["share_asset" ], "asset" )),
1121+ ("taker_fee_percent" , Uint16 (kwargs ["taker_fee_percent" ])),
1122+ ("withdrawal_fee_percent" , Uint16 (kwargs ["withdrawal_fee_percent" ])),
1123+ ("extensions" , Set ([])),
1124+ ]
1125+ )
1126+ )
1127+
1128+
1129+ class Liquidity_pool_delete (GrapheneObject ):
1130+ def __init__ (self , * args , ** kwargs ):
1131+ if isArgsThisClass (self , args ):
1132+ self .data = args [0 ].data
1133+ else :
1134+ if len (args ) == 1 and len (kwargs ) == 0 :
1135+ kwargs = args [0 ]
1136+
1137+ super ().__init__ (
1138+ OrderedDict (
1139+ [
1140+ ("fee" , Asset (kwargs ["fee" ])),
1141+ ("account" , ObjectId (kwargs ["account" ], "account" )),
1142+ ("pool" , ObjectId (kwargs ["pool" ], "liquidity_pool" )),
1143+ ("extensions" , Set ([])),
1144+ ]
1145+ )
1146+ )
1147+
1148+
1149+ class Liquidity_pool_deposit (GrapheneObject ):
1150+ def __init__ (self , * args , ** kwargs ):
1151+ if isArgsThisClass (self , args ):
1152+ self .data = args [0 ].data
1153+ else :
1154+ if len (args ) == 1 and len (kwargs ) == 0 :
1155+ kwargs = args [0 ]
1156+
1157+ super ().__init__ (
1158+ OrderedDict (
1159+ [
1160+ ("fee" , Asset (kwargs ["fee" ])),
1161+ ("account" , ObjectId (kwargs ["account" ], "account" )),
1162+ ("pool" , ObjectId (kwargs ["pool" ], "liquidity_pool" )),
1163+ ("amount_a" , Asset (kwargs ["amount_a" ])),
1164+ ("amount_b" , Asset (kwargs ["amount_b" ])),
1165+ ("extensions" , Set ([])),
1166+ ]
1167+ )
1168+ )
1169+
1170+
1171+ class Liquidity_pool_withdraw (GrapheneObject ):
1172+ def __init__ (self , * args , ** kwargs ):
1173+ if isArgsThisClass (self , args ):
1174+ self .data = args [0 ].data
1175+ else :
1176+ if len (args ) == 1 and len (kwargs ) == 0 :
1177+ kwargs = args [0 ]
1178+
1179+ super ().__init__ (
1180+ OrderedDict (
1181+ [
1182+ ("fee" , Asset (kwargs ["fee" ])),
1183+ ("account" , ObjectId (kwargs ["account" ], "account" )),
1184+ ("pool" , ObjectId (kwargs ["pool" ], "liquidity_pool" )),
1185+ ("share_amount" , Asset (kwargs ["share_amount" ])),
1186+ ("extensions" , Set ([])),
1187+ ]
1188+ )
1189+ )
1190+
1191+
1192+ class Liquidity_pool_exchange (GrapheneObject ):
1193+ def __init__ (self , * args , ** kwargs ):
1194+ if isArgsThisClass (self , args ):
1195+ self .data = args [0 ].data
1196+ else :
1197+ if len (args ) == 1 and len (kwargs ) == 0 :
1198+ kwargs = args [0 ]
1199+
1200+ super ().__init__ (
1201+ OrderedDict (
1202+ [
1203+ ("fee" , Asset (kwargs ["fee" ])),
1204+ ("account" , ObjectId (kwargs ["account" ], "account" )),
1205+ ("pool" , ObjectId (kwargs ["pool" ], "liquidity_pool" )),
1206+ ("amount_to_sell" , Asset (kwargs ["amount_to_sell" ])),
1207+ ("min_to_receive" , Asset (kwargs ["min_to_receive" ])),
1208+ ("extensions" , Set ([])),
1209+ ]
1210+ )
1211+ )
1212+
1213+
11051214fill_classmaps ()
0 commit comments