@azuro-org/toolkit 5.0.1 → 5.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3469,7 +3469,7 @@ const environments = {
3469
3469
  'stateMutability': 'nonpayable',
3470
3470
  'type': 'function',
3471
3471
  },
3472
- ];var FreeBet = [{ 'inputs': [], 'name': 'AlreadyResolved', 'type': 'error' }, { 'inputs': [], 'name': 'BetAlreadyClaimed', 'type': 'error' }, { 'inputs': [], 'name': 'BetExpired', 'type': 'error' }, { 'inputs': [], 'name': 'IncorrectChainId', 'type': 'error' }, { 'inputs': [], 'name': 'InsufficientContractBalance', 'type': 'error' }, { 'inputs': [], 'name': 'InvalidSignature', 'type': 'error' }, { 'inputs': [], 'name': 'OnlyBetOwner', 'type': 'error' }, { 'inputs': [], 'name': 'OnlyFreeBetOwner', 'type': 'error' }, { 'inputs': [], 'name': 'OnlyManager', 'type': 'error' }, { 'inputs': [], 'name': 'SmallMinOdds', 'type': 'error' }, { 'anonymous': false, 'inputs': [{ 'indexed': false, 'internalType': 'address', 'name': 'newAffiliate', 'type': 'address' }], 'name': 'AffiliateChanged', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'indexed': true, 'internalType': 'address', 'name': 'bettor', 'type': 'address' }, { 'indexed': true, 'internalType': 'uint256', 'name': 'freeBetId', 'type': 'uint256' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256' }], 'name': 'BettorWin', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': false, 'internalType': 'uint8', 'name': 'version', 'type': 'uint8' }], 'name': 'Initialized', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'newLp', 'type': 'address' }], 'name': 'LpChanged', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': false, 'internalType': 'address', 'name': 'newManager', 'type': 'address' }], 'name': 'ManagerChanged', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'uint256', 'name': 'freeBetId', 'type': 'uint256' }, { 'indexed': false, 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'indexed': true, 'internalType': 'address', 'name': 'bettor', 'type': 'address' }, { 'indexed': true, 'internalType': 'uint256', 'name': 'azuroBetId', 'type': 'uint256' }, { 'indexed': false, 'internalType': 'uint128', 'name': 'amount', 'type': 'uint128' }, { 'indexed': false, 'internalType': 'uint64', 'name': 'minOdds', 'type': 'uint64' }, { 'indexed': false, 'internalType': 'uint64', 'name': 'expiresAt', 'type': 'uint64' }], 'name': 'NewBet', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'previousOwner', 'type': 'address' }, { 'indexed': true, 'internalType': 'address', 'name': 'newOwner', 'type': 'address' }], 'name': 'OwnershipTransferred', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': false, 'internalType': 'uint256[]', 'name': 'azuroBetId', 'type': 'uint256[]' }], 'name': 'PayoutsResolved', 'type': 'event' }, { 'inputs': [], 'name': 'affiliate', 'outputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'components': [{ 'internalType': 'uint256', 'name': 'chainId', 'type': 'uint256' }, { 'internalType': 'uint256', 'name': 'freeBetId', 'type': 'uint256' }, { 'internalType': 'address', 'name': 'owner', 'type': 'address' }, { 'internalType': 'uint128', 'name': 'amount', 'type': 'uint128' }, { 'internalType': 'uint64', 'name': 'minOdds', 'type': 'uint64' }, { 'internalType': 'uint64', 'name': 'expiresAt', 'type': 'uint64' }], 'internalType': 'struct IFreeBet.FreeBetData', 'name': 'freeBetData', 'type': 'tuple' }, { 'internalType': 'bytes', 'name': 'signature', 'type': 'bytes' }, { 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'internalType': 'uint256', 'name': 'conditionId', 'type': 'uint256' }, { 'internalType': 'uint64', 'name': 'outcomeId', 'type': 'uint64' }, { 'internalType': 'uint64', 'name': 'deadline', 'type': 'uint64' }, { 'internalType': 'uint64', 'name': 'minOdds', 'type': 'uint64' }], 'name': 'bet', 'outputs': [{ 'internalType': 'uint256', 'name': 'azuroBetId', 'type': 'uint256' }], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'account', 'type': 'address' }], 'name': 'checkOwner', 'outputs': [], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'uint256', 'name': '', 'type': 'uint256' }], 'name': 'freeBets', 'outputs': [{ 'internalType': 'address', 'name': 'owner', 'type': 'address' }, { 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'internalType': 'uint256', 'name': 'azuroBetId', 'type': 'uint256' }, { 'internalType': 'uint128', 'name': 'amount', 'type': 'uint128' }, { 'internalType': 'uint128', 'name': 'payout', 'type': 'uint128' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'lpAddress', 'type': 'address' }, { 'internalType': 'address', 'name': 'affiliate_', 'type': 'address' }, { 'internalType': 'address', 'name': 'manager_', 'type': 'address' }], 'name': 'initialize', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [], 'name': 'lockedReserve', 'outputs': [{ 'internalType': 'uint256', 'name': '', 'type': 'uint256' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [], 'name': 'lp', 'outputs': [{ 'internalType': 'contract ILP', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [], 'name': 'manager', 'outputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [], 'name': 'owner', 'outputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'uint256[]', 'name': 'freeBetIds', 'type': 'uint256[]' }], 'name': 'resolvePayout', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'affiliate_', 'type': 'address' }], 'name': 'setAffiliate', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'lp_', 'type': 'address' }], 'name': 'setLp', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'manager_', 'type': 'address' }], 'name': 'setManager', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [], 'name': 'token', 'outputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'newOwner', 'type': 'address' }], 'name': 'transferOwnership', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'uint256', 'name': 'freeBetId', 'type': 'uint256' }], 'name': 'withdrawPayout', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256' }], 'name': 'withdrawReserve', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'stateMutability': 'payable', 'type': 'receive' }];var cashoutAbi = [
3472
+ ];var cashoutAbi = [
3473
3473
  {
3474
3474
  'inputs': [],
3475
3475
  'name': 'BetAlreadyPaid',
@@ -4078,6 +4078,12 @@ const environments = {
4078
4078
  'name': 'bettor',
4079
4079
  'type': 'address',
4080
4080
  },
4081
+ {
4082
+ 'indexed': false,
4083
+ 'internalType': 'address',
4084
+ 'name': 'core',
4085
+ 'type': 'address',
4086
+ },
4081
4087
  {
4082
4088
  'indexed': false,
4083
4089
  'internalType': 'uint256[]',
@@ -4607,168 +4613,1152 @@ const environments = {
4607
4613
  'type': 'tuple',
4608
4614
  },
4609
4615
  ],
4610
- 'stateMutability': 'pure',
4616
+ 'stateMutability': 'pure',
4617
+ 'type': 'function',
4618
+ },
4619
+ {
4620
+ 'inputs': [
4621
+ {
4622
+ 'components': [
4623
+ {
4624
+ 'internalType': 'address',
4625
+ 'name': 'betOwner',
4626
+ 'type': 'address',
4627
+ },
4628
+ {
4629
+ 'components': [
4630
+ {
4631
+ 'internalType': 'uint256',
4632
+ 'name': 'gameId',
4633
+ 'type': 'uint256',
4634
+ },
4635
+ {
4636
+ 'internalType': 'uint256',
4637
+ 'name': 'conditionId',
4638
+ 'type': 'uint256',
4639
+ },
4640
+ {
4641
+ 'internalType': 'enum IOrder.ConditionKind',
4642
+ 'name': 'conditionKind',
4643
+ 'type': 'uint8',
4644
+ },
4645
+ {
4646
+ 'internalType': 'uint64[]',
4647
+ 'name': 'odds',
4648
+ 'type': 'uint64[]',
4649
+ },
4650
+ {
4651
+ 'internalType': 'uint128[]',
4652
+ 'name': 'outcomes',
4653
+ 'type': 'uint128[]',
4654
+ },
4655
+ {
4656
+ 'internalType': 'uint128',
4657
+ 'name': 'potentialLossLimit',
4658
+ 'type': 'uint128',
4659
+ },
4660
+ {
4661
+ 'internalType': 'uint8',
4662
+ 'name': 'winningOutcomesCount',
4663
+ 'type': 'uint8',
4664
+ },
4665
+ ],
4666
+ 'internalType': 'struct IOrder.ConditionData[]',
4667
+ 'name': 'conditionDatas',
4668
+ 'type': 'tuple[]',
4669
+ },
4670
+ {
4671
+ 'internalType': 'enum IOrder.BetType',
4672
+ 'name': 'betType',
4673
+ 'type': 'uint8',
4674
+ },
4675
+ {
4676
+ 'internalType': 'address',
4677
+ 'name': 'oracle',
4678
+ 'type': 'address',
4679
+ },
4680
+ {
4681
+ 'internalType': 'bytes',
4682
+ 'name': 'clientBetData',
4683
+ 'type': 'bytes',
4684
+ },
4685
+ {
4686
+ 'internalType': 'bytes',
4687
+ 'name': 'bettorSignature',
4688
+ 'type': 'bytes',
4689
+ },
4690
+ {
4691
+ 'internalType': 'bytes',
4692
+ 'name': 'oracleSignature',
4693
+ 'type': 'bytes',
4694
+ },
4695
+ ],
4696
+ 'internalType': 'struct IOrder.OrderData',
4697
+ 'name': 'order',
4698
+ 'type': 'tuple',
4699
+ },
4700
+ ],
4701
+ 'name': 'getOrderBetsAmounts',
4702
+ 'outputs': [
4703
+ {
4704
+ 'internalType': 'uint128',
4705
+ 'name': 'totalAmount',
4706
+ 'type': 'uint128',
4707
+ },
4708
+ {
4709
+ 'internalType': 'uint128[]',
4710
+ 'name': 'amounts',
4711
+ 'type': 'uint128[]',
4712
+ },
4713
+ ],
4714
+ 'stateMutability': 'pure',
4715
+ 'type': 'function',
4716
+ },
4717
+ {
4718
+ 'inputs': [
4719
+ {
4720
+ 'internalType': 'address',
4721
+ 'name': 'lp_',
4722
+ 'type': 'address',
4723
+ },
4724
+ {
4725
+ 'internalType': 'address',
4726
+ 'name': 'payMaster_',
4727
+ 'type': 'address',
4728
+ },
4729
+ ],
4730
+ 'name': 'initialize',
4731
+ 'outputs': [],
4732
+ 'stateMutability': 'nonpayable',
4733
+ 'type': 'function',
4734
+ },
4735
+ {
4736
+ 'inputs': [],
4737
+ 'name': 'lp',
4738
+ 'outputs': [
4739
+ {
4740
+ 'internalType': 'contract ILP',
4741
+ 'name': '',
4742
+ 'type': 'address',
4743
+ },
4744
+ ],
4745
+ 'stateMutability': 'view',
4746
+ 'type': 'function',
4747
+ },
4748
+ {
4749
+ 'inputs': [],
4750
+ 'name': 'owner',
4751
+ 'outputs': [
4752
+ {
4753
+ 'internalType': 'address',
4754
+ 'name': '',
4755
+ 'type': 'address',
4756
+ },
4757
+ ],
4758
+ 'stateMutability': 'view',
4759
+ 'type': 'function',
4760
+ },
4761
+ {
4762
+ 'inputs': [],
4763
+ 'name': 'payMaster',
4764
+ 'outputs': [
4765
+ {
4766
+ 'internalType': 'contract IPayMaster',
4767
+ 'name': '',
4768
+ 'type': 'address',
4769
+ },
4770
+ ],
4771
+ 'stateMutability': 'view',
4772
+ 'type': 'function',
4773
+ },
4774
+ {
4775
+ 'inputs': [],
4776
+ 'name': 'renounceOwnership',
4777
+ 'outputs': [],
4778
+ 'stateMutability': 'nonpayable',
4779
+ 'type': 'function',
4780
+ },
4781
+ {
4782
+ 'inputs': [
4783
+ {
4784
+ 'internalType': 'address',
4785
+ 'name': 'newOwner',
4786
+ 'type': 'address',
4787
+ },
4788
+ ],
4789
+ 'name': 'transferOwnership',
4790
+ 'outputs': [],
4791
+ 'stateMutability': 'nonpayable',
4792
+ 'type': 'function',
4793
+ },
4794
+ ];var vaultAbi = [
4795
+ {
4796
+ 'inputs': [],
4797
+ 'name': 'DepositDoesNotExist',
4798
+ 'type': 'error',
4799
+ },
4800
+ {
4801
+ 'inputs': [],
4802
+ 'name': 'ERC721EnumerableForbiddenBatchMint',
4803
+ 'type': 'error',
4804
+ },
4805
+ {
4806
+ 'inputs': [
4807
+ {
4808
+ 'internalType': 'address',
4809
+ 'name': 'sender',
4810
+ 'type': 'address',
4811
+ },
4812
+ {
4813
+ 'internalType': 'uint256',
4814
+ 'name': 'tokenId',
4815
+ 'type': 'uint256',
4816
+ },
4817
+ {
4818
+ 'internalType': 'address',
4819
+ 'name': 'owner',
4820
+ 'type': 'address',
4821
+ },
4822
+ ],
4823
+ 'name': 'ERC721IncorrectOwner',
4824
+ 'type': 'error',
4825
+ },
4826
+ {
4827
+ 'inputs': [
4828
+ {
4829
+ 'internalType': 'address',
4830
+ 'name': 'operator',
4831
+ 'type': 'address',
4832
+ },
4833
+ {
4834
+ 'internalType': 'uint256',
4835
+ 'name': 'tokenId',
4836
+ 'type': 'uint256',
4837
+ },
4838
+ ],
4839
+ 'name': 'ERC721InsufficientApproval',
4840
+ 'type': 'error',
4841
+ },
4842
+ {
4843
+ 'inputs': [
4844
+ {
4845
+ 'internalType': 'address',
4846
+ 'name': 'approver',
4847
+ 'type': 'address',
4848
+ },
4849
+ ],
4850
+ 'name': 'ERC721InvalidApprover',
4851
+ 'type': 'error',
4852
+ },
4853
+ {
4854
+ 'inputs': [
4855
+ {
4856
+ 'internalType': 'address',
4857
+ 'name': 'operator',
4858
+ 'type': 'address',
4859
+ },
4860
+ ],
4861
+ 'name': 'ERC721InvalidOperator',
4862
+ 'type': 'error',
4863
+ },
4864
+ {
4865
+ 'inputs': [
4866
+ {
4867
+ 'internalType': 'address',
4868
+ 'name': 'owner',
4869
+ 'type': 'address',
4870
+ },
4871
+ ],
4872
+ 'name': 'ERC721InvalidOwner',
4873
+ 'type': 'error',
4874
+ },
4875
+ {
4876
+ 'inputs': [
4877
+ {
4878
+ 'internalType': 'address',
4879
+ 'name': 'receiver',
4880
+ 'type': 'address',
4881
+ },
4882
+ ],
4883
+ 'name': 'ERC721InvalidReceiver',
4884
+ 'type': 'error',
4885
+ },
4886
+ {
4887
+ 'inputs': [
4888
+ {
4889
+ 'internalType': 'address',
4890
+ 'name': 'sender',
4891
+ 'type': 'address',
4892
+ },
4893
+ ],
4894
+ 'name': 'ERC721InvalidSender',
4895
+ 'type': 'error',
4896
+ },
4897
+ {
4898
+ 'inputs': [
4899
+ {
4900
+ 'internalType': 'uint256',
4901
+ 'name': 'tokenId',
4902
+ 'type': 'uint256',
4903
+ },
4904
+ ],
4905
+ 'name': 'ERC721NonexistentToken',
4906
+ 'type': 'error',
4907
+ },
4908
+ {
4909
+ 'inputs': [
4910
+ {
4911
+ 'internalType': 'address',
4912
+ 'name': 'owner',
4913
+ 'type': 'address',
4914
+ },
4915
+ {
4916
+ 'internalType': 'uint256',
4917
+ 'name': 'index',
4918
+ 'type': 'uint256',
4919
+ },
4920
+ ],
4921
+ 'name': 'ERC721OutOfBoundsIndex',
4922
+ 'type': 'error',
4923
+ },
4924
+ {
4925
+ 'inputs': [],
4926
+ 'name': 'IncorrectAmount',
4927
+ 'type': 'error',
4928
+ },
4929
+ {
4930
+ 'inputs': [],
4931
+ 'name': 'IncorrectDeposit',
4932
+ 'type': 'error',
4933
+ },
4934
+ {
4935
+ 'inputs': [],
4936
+ 'name': 'IncorrectLeaf',
4937
+ 'type': 'error',
4938
+ },
4939
+ {
4940
+ 'inputs': [],
4941
+ 'name': 'IncorrectPercent',
4942
+ 'type': 'error',
4943
+ },
4944
+ {
4945
+ 'inputs': [],
4946
+ 'name': 'InsufficientTopNodeAmount',
4947
+ 'type': 'error',
4948
+ },
4949
+ {
4950
+ 'inputs': [],
4951
+ 'name': 'InvalidInitialization',
4952
+ 'type': 'error',
4953
+ },
4954
+ {
4955
+ 'inputs': [],
4956
+ 'name': 'LeafNotExist',
4957
+ 'type': 'error',
4958
+ },
4959
+ {
4960
+ 'inputs': [],
4961
+ 'name': 'LeafNumberRangeExceeded',
4962
+ 'type': 'error',
4963
+ },
4964
+ {
4965
+ 'inputs': [],
4966
+ 'name': 'LiquidityIsLocked',
4967
+ 'type': 'error',
4968
+ },
4969
+ {
4970
+ 'inputs': [],
4971
+ 'name': 'NotEnoughLiquidity',
4972
+ 'type': 'error',
4973
+ },
4974
+ {
4975
+ 'inputs': [],
4976
+ 'name': 'NotEnoughLockedLiquidity',
4977
+ 'type': 'error',
4978
+ },
4979
+ {
4980
+ 'inputs': [],
4981
+ 'name': 'NotInitializing',
4982
+ 'type': 'error',
4983
+ },
4984
+ {
4985
+ 'inputs': [],
4986
+ 'name': 'OnlyAdmin',
4987
+ 'type': 'error',
4988
+ },
4989
+ {
4990
+ 'inputs': [
4991
+ {
4992
+ 'internalType': 'address',
4993
+ 'name': 'owner',
4994
+ 'type': 'address',
4995
+ },
4996
+ ],
4997
+ 'name': 'OwnableInvalidOwner',
4998
+ 'type': 'error',
4999
+ },
5000
+ {
5001
+ 'inputs': [
5002
+ {
5003
+ 'internalType': 'address',
5004
+ 'name': 'account',
5005
+ 'type': 'address',
5006
+ },
5007
+ ],
5008
+ 'name': 'OwnableUnauthorizedAccount',
5009
+ 'type': 'error',
5010
+ },
5011
+ {
5012
+ 'anonymous': false,
5013
+ 'inputs': [
5014
+ {
5015
+ 'indexed': false,
5016
+ 'internalType': 'address',
5017
+ 'name': 'newAdmin',
5018
+ 'type': 'address',
5019
+ },
5020
+ ],
5021
+ 'name': 'AdminChanged',
5022
+ 'type': 'event',
5023
+ },
5024
+ {
5025
+ 'anonymous': false,
5026
+ 'inputs': [
5027
+ {
5028
+ 'indexed': true,
5029
+ 'internalType': 'address',
5030
+ 'name': 'owner',
5031
+ 'type': 'address',
5032
+ },
5033
+ {
5034
+ 'indexed': true,
5035
+ 'internalType': 'address',
5036
+ 'name': 'approved',
5037
+ 'type': 'address',
5038
+ },
5039
+ {
5040
+ 'indexed': true,
5041
+ 'internalType': 'uint256',
5042
+ 'name': 'tokenId',
5043
+ 'type': 'uint256',
5044
+ },
5045
+ ],
5046
+ 'name': 'Approval',
5047
+ 'type': 'event',
5048
+ },
5049
+ {
5050
+ 'anonymous': false,
5051
+ 'inputs': [
5052
+ {
5053
+ 'indexed': true,
5054
+ 'internalType': 'address',
5055
+ 'name': 'owner',
5056
+ 'type': 'address',
5057
+ },
5058
+ {
5059
+ 'indexed': true,
5060
+ 'internalType': 'address',
5061
+ 'name': 'operator',
5062
+ 'type': 'address',
5063
+ },
5064
+ {
5065
+ 'indexed': false,
5066
+ 'internalType': 'bool',
5067
+ 'name': 'approved',
5068
+ 'type': 'bool',
5069
+ },
5070
+ ],
5071
+ 'name': 'ApprovalForAll',
5072
+ 'type': 'event',
5073
+ },
5074
+ {
5075
+ 'anonymous': false,
5076
+ 'inputs': [
5077
+ {
5078
+ 'indexed': false,
5079
+ 'internalType': 'uint64',
5080
+ 'name': 'version',
5081
+ 'type': 'uint64',
5082
+ },
5083
+ ],
5084
+ 'name': 'Initialized',
5085
+ 'type': 'event',
5086
+ },
5087
+ {
5088
+ 'anonymous': false,
5089
+ 'inputs': [
5090
+ {
5091
+ 'indexed': true,
5092
+ 'internalType': 'address',
5093
+ 'name': 'previousOwner',
5094
+ 'type': 'address',
5095
+ },
5096
+ {
5097
+ 'indexed': true,
5098
+ 'internalType': 'address',
5099
+ 'name': 'newOwner',
5100
+ 'type': 'address',
5101
+ },
5102
+ ],
5103
+ 'name': 'OwnershipTransferred',
5104
+ 'type': 'event',
5105
+ },
5106
+ {
5107
+ 'anonymous': false,
5108
+ 'inputs': [
5109
+ {
5110
+ 'indexed': true,
5111
+ 'internalType': 'address',
5112
+ 'name': 'from',
5113
+ 'type': 'address',
5114
+ },
5115
+ {
5116
+ 'indexed': true,
5117
+ 'internalType': 'address',
5118
+ 'name': 'to',
5119
+ 'type': 'address',
5120
+ },
5121
+ {
5122
+ 'indexed': true,
5123
+ 'internalType': 'uint256',
5124
+ 'name': 'tokenId',
5125
+ 'type': 'uint256',
5126
+ },
5127
+ ],
5128
+ 'name': 'Transfer',
5129
+ 'type': 'event',
5130
+ },
5131
+ {
5132
+ 'anonymous': false,
5133
+ 'inputs': [
5134
+ {
5135
+ 'indexed': false,
5136
+ 'internalType': 'address',
5137
+ 'name': 'wallet',
5138
+ 'type': 'address',
5139
+ },
5140
+ {
5141
+ 'indexed': false,
5142
+ 'internalType': 'uint128',
5143
+ 'name': 'amount',
5144
+ 'type': 'uint128',
5145
+ },
5146
+ ],
5147
+ 'name': 'Withdrawn',
5148
+ 'type': 'event',
5149
+ },
5150
+ {
5151
+ 'inputs': [
5152
+ {
5153
+ 'internalType': 'address',
5154
+ 'name': 'depositor',
5155
+ 'type': 'address',
5156
+ },
5157
+ {
5158
+ 'internalType': 'uint128',
5159
+ 'name': 'amount',
5160
+ 'type': 'uint128',
5161
+ },
5162
+ ],
5163
+ 'name': 'addDeposit',
5164
+ 'outputs': [
5165
+ {
5166
+ 'internalType': 'uint48',
5167
+ 'name': 'depositId',
5168
+ 'type': 'uint48',
5169
+ },
5170
+ ],
5171
+ 'stateMutability': 'nonpayable',
5172
+ 'type': 'function',
5173
+ },
5174
+ {
5175
+ 'inputs': [
5176
+ {
5177
+ 'internalType': 'uint128',
5178
+ 'name': 'amount',
5179
+ 'type': 'uint128',
5180
+ },
5181
+ {
5182
+ 'internalType': 'uint48',
5183
+ 'name': 'depositId',
5184
+ 'type': 'uint48',
5185
+ },
5186
+ ],
5187
+ 'name': 'addLiquidity',
5188
+ 'outputs': [],
5189
+ 'stateMutability': 'nonpayable',
5190
+ 'type': 'function',
5191
+ },
5192
+ {
5193
+ 'inputs': [],
5194
+ 'name': 'admin',
5195
+ 'outputs': [
5196
+ {
5197
+ 'internalType': 'address',
5198
+ 'name': '',
5199
+ 'type': 'address',
5200
+ },
5201
+ ],
5202
+ 'stateMutability': 'view',
5203
+ 'type': 'function',
5204
+ },
5205
+ {
5206
+ 'inputs': [
5207
+ {
5208
+ 'internalType': 'address',
5209
+ 'name': 'to',
5210
+ 'type': 'address',
5211
+ },
5212
+ {
5213
+ 'internalType': 'uint256',
5214
+ 'name': 'tokenId',
5215
+ 'type': 'uint256',
5216
+ },
5217
+ ],
5218
+ 'name': 'approve',
5219
+ 'outputs': [],
5220
+ 'stateMutability': 'nonpayable',
5221
+ 'type': 'function',
5222
+ },
5223
+ {
5224
+ 'inputs': [
5225
+ {
5226
+ 'internalType': 'address',
5227
+ 'name': 'owner',
5228
+ 'type': 'address',
5229
+ },
5230
+ ],
5231
+ 'name': 'balanceOf',
5232
+ 'outputs': [
5233
+ {
5234
+ 'internalType': 'uint256',
5235
+ 'name': '',
5236
+ 'type': 'uint256',
5237
+ },
5238
+ ],
5239
+ 'stateMutability': 'view',
5240
+ 'type': 'function',
5241
+ },
5242
+ {
5243
+ 'inputs': [
5244
+ {
5245
+ 'internalType': 'address',
5246
+ 'name': 'newAdmin',
5247
+ 'type': 'address',
5248
+ },
5249
+ ],
5250
+ 'name': 'changeAdmin',
5251
+ 'outputs': [],
5252
+ 'stateMutability': 'nonpayable',
5253
+ 'type': 'function',
5254
+ },
5255
+ {
5256
+ 'inputs': [
5257
+ {
5258
+ 'internalType': 'uint256',
5259
+ 'name': 'tokenId',
5260
+ 'type': 'uint256',
5261
+ },
5262
+ ],
5263
+ 'name': 'getApproved',
5264
+ 'outputs': [
5265
+ {
5266
+ 'internalType': 'address',
5267
+ 'name': '',
5268
+ 'type': 'address',
5269
+ },
5270
+ ],
5271
+ 'stateMutability': 'view',
5272
+ 'type': 'function',
5273
+ },
5274
+ {
5275
+ 'inputs': [],
5276
+ 'name': 'getLastDepositId',
5277
+ 'outputs': [
5278
+ {
5279
+ 'internalType': 'uint48',
5280
+ 'name': 'depositId',
5281
+ 'type': 'uint48',
5282
+ },
5283
+ ],
5284
+ 'stateMutability': 'view',
5285
+ 'type': 'function',
5286
+ },
5287
+ {
5288
+ 'inputs': [],
5289
+ 'name': 'getReserve',
5290
+ 'outputs': [
5291
+ {
5292
+ 'internalType': 'uint128',
5293
+ 'name': 'reserve',
5294
+ 'type': 'uint128',
5295
+ },
5296
+ ],
5297
+ 'stateMutability': 'view',
5298
+ 'type': 'function',
5299
+ },
5300
+ {
5301
+ 'inputs': [
5302
+ {
5303
+ 'internalType': 'address',
5304
+ 'name': 'token_',
5305
+ 'type': 'address',
5306
+ },
5307
+ ],
5308
+ 'name': 'initialize',
5309
+ 'outputs': [],
5310
+ 'stateMutability': 'nonpayable',
5311
+ 'type': 'function',
5312
+ },
5313
+ {
5314
+ 'inputs': [
5315
+ {
5316
+ 'internalType': 'address',
5317
+ 'name': 'owner',
5318
+ 'type': 'address',
5319
+ },
5320
+ {
5321
+ 'internalType': 'address',
5322
+ 'name': 'operator',
5323
+ 'type': 'address',
5324
+ },
5325
+ ],
5326
+ 'name': 'isApprovedForAll',
5327
+ 'outputs': [
5328
+ {
5329
+ 'internalType': 'bool',
5330
+ 'name': '',
5331
+ 'type': 'bool',
5332
+ },
5333
+ ],
5334
+ 'stateMutability': 'view',
5335
+ 'type': 'function',
5336
+ },
5337
+ {
5338
+ 'inputs': [
5339
+ {
5340
+ 'internalType': 'uint256',
5341
+ 'name': 'depositId',
5342
+ 'type': 'uint256',
5343
+ },
5344
+ ],
5345
+ 'name': 'isDepositExists',
5346
+ 'outputs': [
5347
+ {
5348
+ 'internalType': 'bool',
5349
+ 'name': '',
5350
+ 'type': 'bool',
5351
+ },
5352
+ ],
5353
+ 'stateMutability': 'view',
5354
+ 'type': 'function',
5355
+ },
5356
+ {
5357
+ 'inputs': [
5358
+ {
5359
+ 'internalType': 'uint128',
5360
+ 'name': 'amount',
5361
+ 'type': 'uint128',
5362
+ },
5363
+ ],
5364
+ 'name': 'lockLiquidity',
5365
+ 'outputs': [],
5366
+ 'stateMutability': 'nonpayable',
5367
+ 'type': 'function',
5368
+ },
5369
+ {
5370
+ 'inputs': [],
5371
+ 'name': 'lockedLiquidity',
5372
+ 'outputs': [
5373
+ {
5374
+ 'internalType': 'uint128',
5375
+ 'name': '',
5376
+ 'type': 'uint128',
5377
+ },
5378
+ ],
5379
+ 'stateMutability': 'view',
5380
+ 'type': 'function',
5381
+ },
5382
+ {
5383
+ 'inputs': [],
5384
+ 'name': 'name',
5385
+ 'outputs': [
5386
+ {
5387
+ 'internalType': 'string',
5388
+ 'name': '',
5389
+ 'type': 'string',
5390
+ },
5391
+ ],
5392
+ 'stateMutability': 'view',
5393
+ 'type': 'function',
5394
+ },
5395
+ {
5396
+ 'inputs': [],
5397
+ 'name': 'nextNode',
5398
+ 'outputs': [
5399
+ {
5400
+ 'internalType': 'uint48',
5401
+ 'name': '',
5402
+ 'type': 'uint48',
5403
+ },
5404
+ ],
5405
+ 'stateMutability': 'view',
5406
+ 'type': 'function',
5407
+ },
5408
+ {
5409
+ 'inputs': [
5410
+ {
5411
+ 'internalType': 'uint48',
5412
+ 'name': 'leaf',
5413
+ 'type': 'uint48',
5414
+ },
5415
+ ],
5416
+ 'name': 'nodeWithdrawView',
5417
+ 'outputs': [
5418
+ {
5419
+ 'internalType': 'uint128',
5420
+ 'name': 'withdrawAmount',
5421
+ 'type': 'uint128',
5422
+ },
5423
+ ],
5424
+ 'stateMutability': 'view',
5425
+ 'type': 'function',
5426
+ },
5427
+ {
5428
+ 'inputs': [],
5429
+ 'name': 'owner',
5430
+ 'outputs': [
5431
+ {
5432
+ 'internalType': 'address',
5433
+ 'name': '',
5434
+ 'type': 'address',
5435
+ },
5436
+ ],
5437
+ 'stateMutability': 'view',
5438
+ 'type': 'function',
5439
+ },
5440
+ {
5441
+ 'inputs': [
5442
+ {
5443
+ 'internalType': 'uint256',
5444
+ 'name': 'tokenId',
5445
+ 'type': 'uint256',
5446
+ },
5447
+ ],
5448
+ 'name': 'ownerOf',
5449
+ 'outputs': [
5450
+ {
5451
+ 'internalType': 'address',
5452
+ 'name': '',
5453
+ 'type': 'address',
5454
+ },
5455
+ ],
5456
+ 'stateMutability': 'view',
5457
+ 'type': 'function',
5458
+ },
5459
+ {
5460
+ 'inputs': [],
5461
+ 'name': 'renounceOwnership',
5462
+ 'outputs': [],
5463
+ 'stateMutability': 'nonpayable',
5464
+ 'type': 'function',
5465
+ },
5466
+ {
5467
+ 'inputs': [
5468
+ {
5469
+ 'internalType': 'address',
5470
+ 'name': 'from',
5471
+ 'type': 'address',
5472
+ },
5473
+ {
5474
+ 'internalType': 'address',
5475
+ 'name': 'to',
5476
+ 'type': 'address',
5477
+ },
5478
+ {
5479
+ 'internalType': 'uint256',
5480
+ 'name': 'tokenId',
5481
+ 'type': 'uint256',
5482
+ },
5483
+ ],
5484
+ 'name': 'safeTransferFrom',
5485
+ 'outputs': [],
5486
+ 'stateMutability': 'nonpayable',
5487
+ 'type': 'function',
5488
+ },
5489
+ {
5490
+ 'inputs': [
5491
+ {
5492
+ 'internalType': 'address',
5493
+ 'name': 'from',
5494
+ 'type': 'address',
5495
+ },
5496
+ {
5497
+ 'internalType': 'address',
5498
+ 'name': 'to',
5499
+ 'type': 'address',
5500
+ },
5501
+ {
5502
+ 'internalType': 'uint256',
5503
+ 'name': 'tokenId',
5504
+ 'type': 'uint256',
5505
+ },
5506
+ {
5507
+ 'internalType': 'bytes',
5508
+ 'name': 'data',
5509
+ 'type': 'bytes',
5510
+ },
5511
+ ],
5512
+ 'name': 'safeTransferFrom',
5513
+ 'outputs': [],
5514
+ 'stateMutability': 'nonpayable',
5515
+ 'type': 'function',
5516
+ },
5517
+ {
5518
+ 'inputs': [
5519
+ {
5520
+ 'internalType': 'address',
5521
+ 'name': 'operator',
5522
+ 'type': 'address',
5523
+ },
5524
+ {
5525
+ 'internalType': 'bool',
5526
+ 'name': 'approved',
5527
+ 'type': 'bool',
5528
+ },
5529
+ ],
5530
+ 'name': 'setApprovalForAll',
5531
+ 'outputs': [],
5532
+ 'stateMutability': 'nonpayable',
5533
+ 'type': 'function',
5534
+ },
5535
+ {
5536
+ 'inputs': [
5537
+ {
5538
+ 'internalType': 'bytes4',
5539
+ 'name': 'interfaceId',
5540
+ 'type': 'bytes4',
5541
+ },
5542
+ ],
5543
+ 'name': 'supportsInterface',
5544
+ 'outputs': [
5545
+ {
5546
+ 'internalType': 'bool',
5547
+ 'name': '',
5548
+ 'type': 'bool',
5549
+ },
5550
+ ],
5551
+ 'stateMutability': 'view',
5552
+ 'type': 'function',
5553
+ },
5554
+ {
5555
+ 'inputs': [],
5556
+ 'name': 'symbol',
5557
+ 'outputs': [
5558
+ {
5559
+ 'internalType': 'string',
5560
+ 'name': '',
5561
+ 'type': 'string',
5562
+ },
5563
+ ],
5564
+ 'stateMutability': 'view',
5565
+ 'type': 'function',
5566
+ },
5567
+ {
5568
+ 'inputs': [],
5569
+ 'name': 'token',
5570
+ 'outputs': [
5571
+ {
5572
+ 'internalType': 'address',
5573
+ 'name': '',
5574
+ 'type': 'address',
5575
+ },
5576
+ ],
5577
+ 'stateMutability': 'view',
5578
+ 'type': 'function',
5579
+ },
5580
+ {
5581
+ 'inputs': [
5582
+ {
5583
+ 'internalType': 'uint256',
5584
+ 'name': 'index',
5585
+ 'type': 'uint256',
5586
+ },
5587
+ ],
5588
+ 'name': 'tokenByIndex',
5589
+ 'outputs': [
5590
+ {
5591
+ 'internalType': 'uint256',
5592
+ 'name': '',
5593
+ 'type': 'uint256',
5594
+ },
5595
+ ],
5596
+ 'stateMutability': 'view',
5597
+ 'type': 'function',
5598
+ },
5599
+ {
5600
+ 'inputs': [
5601
+ {
5602
+ 'internalType': 'address',
5603
+ 'name': 'owner',
5604
+ 'type': 'address',
5605
+ },
5606
+ {
5607
+ 'internalType': 'uint256',
5608
+ 'name': 'index',
5609
+ 'type': 'uint256',
5610
+ },
5611
+ ],
5612
+ 'name': 'tokenOfOwnerByIndex',
5613
+ 'outputs': [
5614
+ {
5615
+ 'internalType': 'uint256',
5616
+ 'name': '',
5617
+ 'type': 'uint256',
5618
+ },
5619
+ ],
5620
+ 'stateMutability': 'view',
4611
5621
  'type': 'function',
4612
5622
  },
4613
5623
  {
4614
5624
  'inputs': [
4615
5625
  {
4616
- 'components': [
4617
- {
4618
- 'internalType': 'address',
4619
- 'name': 'betOwner',
4620
- 'type': 'address',
4621
- },
4622
- {
4623
- 'components': [
4624
- {
4625
- 'internalType': 'uint256',
4626
- 'name': 'gameId',
4627
- 'type': 'uint256',
4628
- },
4629
- {
4630
- 'internalType': 'uint256',
4631
- 'name': 'conditionId',
4632
- 'type': 'uint256',
4633
- },
4634
- {
4635
- 'internalType': 'enum IOrder.ConditionKind',
4636
- 'name': 'conditionKind',
4637
- 'type': 'uint8',
4638
- },
4639
- {
4640
- 'internalType': 'uint64[]',
4641
- 'name': 'odds',
4642
- 'type': 'uint64[]',
4643
- },
4644
- {
4645
- 'internalType': 'uint128[]',
4646
- 'name': 'outcomes',
4647
- 'type': 'uint128[]',
4648
- },
4649
- {
4650
- 'internalType': 'uint128',
4651
- 'name': 'potentialLossLimit',
4652
- 'type': 'uint128',
4653
- },
4654
- {
4655
- 'internalType': 'uint8',
4656
- 'name': 'winningOutcomesCount',
4657
- 'type': 'uint8',
4658
- },
4659
- ],
4660
- 'internalType': 'struct IOrder.ConditionData[]',
4661
- 'name': 'conditionDatas',
4662
- 'type': 'tuple[]',
4663
- },
4664
- {
4665
- 'internalType': 'enum IOrder.BetType',
4666
- 'name': 'betType',
4667
- 'type': 'uint8',
4668
- },
4669
- {
4670
- 'internalType': 'address',
4671
- 'name': 'oracle',
4672
- 'type': 'address',
4673
- },
4674
- {
4675
- 'internalType': 'bytes',
4676
- 'name': 'clientBetData',
4677
- 'type': 'bytes',
4678
- },
4679
- {
4680
- 'internalType': 'bytes',
4681
- 'name': 'bettorSignature',
4682
- 'type': 'bytes',
4683
- },
4684
- {
4685
- 'internalType': 'bytes',
4686
- 'name': 'oracleSignature',
4687
- 'type': 'bytes',
4688
- },
4689
- ],
4690
- 'internalType': 'struct IOrder.OrderData',
4691
- 'name': 'order',
4692
- 'type': 'tuple',
5626
+ 'internalType': 'uint256',
5627
+ 'name': 'tokenId',
5628
+ 'type': 'uint256',
4693
5629
  },
4694
5630
  ],
4695
- 'name': 'getOrderBetsAmounts',
5631
+ 'name': 'tokenURI',
4696
5632
  'outputs': [
4697
5633
  {
4698
- 'internalType': 'uint128',
4699
- 'name': 'totalAmount',
4700
- 'type': 'uint128',
5634
+ 'internalType': 'string',
5635
+ 'name': '',
5636
+ 'type': 'string',
4701
5637
  },
5638
+ ],
5639
+ 'stateMutability': 'view',
5640
+ 'type': 'function',
5641
+ },
5642
+ {
5643
+ 'inputs': [],
5644
+ 'name': 'totalSupply',
5645
+ 'outputs': [
4702
5646
  {
4703
- 'internalType': 'uint128[]',
4704
- 'name': 'amounts',
4705
- 'type': 'uint128[]',
5647
+ 'internalType': 'uint256',
5648
+ 'name': '',
5649
+ 'type': 'uint256',
4706
5650
  },
4707
5651
  ],
4708
- 'stateMutability': 'pure',
5652
+ 'stateMutability': 'view',
4709
5653
  'type': 'function',
4710
5654
  },
4711
5655
  {
4712
5656
  'inputs': [
4713
5657
  {
4714
5658
  'internalType': 'address',
4715
- 'name': 'lp_',
5659
+ 'name': 'from',
4716
5660
  'type': 'address',
4717
5661
  },
4718
5662
  {
4719
5663
  'internalType': 'address',
4720
- 'name': 'payMaster_',
5664
+ 'name': 'to',
4721
5665
  'type': 'address',
4722
5666
  },
5667
+ {
5668
+ 'internalType': 'uint256',
5669
+ 'name': 'tokenId',
5670
+ 'type': 'uint256',
5671
+ },
4723
5672
  ],
4724
- 'name': 'initialize',
5673
+ 'name': 'transferFrom',
4725
5674
  'outputs': [],
4726
5675
  'stateMutability': 'nonpayable',
4727
5676
  'type': 'function',
4728
5677
  },
4729
5678
  {
4730
- 'inputs': [],
4731
- 'name': 'lp',
4732
- 'outputs': [
5679
+ 'inputs': [
4733
5680
  {
4734
- 'internalType': 'contract ILP',
4735
- 'name': '',
5681
+ 'internalType': 'address',
5682
+ 'name': 'newOwner',
4736
5683
  'type': 'address',
4737
5684
  },
4738
5685
  ],
4739
- 'stateMutability': 'view',
5686
+ 'name': 'transferOwnership',
5687
+ 'outputs': [],
5688
+ 'stateMutability': 'nonpayable',
4740
5689
  'type': 'function',
4741
5690
  },
4742
5691
  {
4743
- 'inputs': [],
4744
- 'name': 'owner',
4745
- 'outputs': [
5692
+ 'inputs': [
4746
5693
  {
4747
- 'internalType': 'address',
5694
+ 'internalType': 'uint48',
4748
5695
  'name': '',
4749
- 'type': 'address',
5696
+ 'type': 'uint48',
5697
+ },
5698
+ ],
5699
+ 'name': 'treeNode',
5700
+ 'outputs': [
5701
+ {
5702
+ 'internalType': 'uint64',
5703
+ 'name': 'updateId',
5704
+ 'type': 'uint64',
5705
+ },
5706
+ {
5707
+ 'internalType': 'uint128',
5708
+ 'name': 'amount',
5709
+ 'type': 'uint128',
4750
5710
  },
4751
5711
  ],
4752
5712
  'stateMutability': 'view',
4753
5713
  'type': 'function',
4754
5714
  },
5715
+ {
5716
+ 'inputs': [
5717
+ {
5718
+ 'internalType': 'uint128',
5719
+ 'name': 'amount',
5720
+ 'type': 'uint128',
5721
+ },
5722
+ ],
5723
+ 'name': 'unlockLiquidity',
5724
+ 'outputs': [],
5725
+ 'stateMutability': 'nonpayable',
5726
+ 'type': 'function',
5727
+ },
4755
5728
  {
4756
5729
  'inputs': [],
4757
- 'name': 'payMaster',
5730
+ 'name': 'updateId',
4758
5731
  'outputs': [
4759
5732
  {
4760
- 'internalType': 'contract IPayMaster',
5733
+ 'internalType': 'uint64',
4761
5734
  'name': '',
4762
- 'type': 'address',
5735
+ 'type': 'uint64',
4763
5736
  },
4764
5737
  ],
4765
5738
  'stateMutability': 'view',
4766
5739
  'type': 'function',
4767
5740
  },
4768
5741
  {
4769
- 'inputs': [],
4770
- 'name': 'renounceOwnership',
4771
- 'outputs': [],
5742
+ 'inputs': [
5743
+ {
5744
+ 'internalType': 'uint48',
5745
+ 'name': 'depositId',
5746
+ 'type': 'uint48',
5747
+ },
5748
+ {
5749
+ 'internalType': 'uint40',
5750
+ 'name': 'percent',
5751
+ 'type': 'uint40',
5752
+ },
5753
+ ],
5754
+ 'name': 'withdrawDeposit',
5755
+ 'outputs': [
5756
+ {
5757
+ 'internalType': 'uint128',
5758
+ 'name': 'withdrawnAmount',
5759
+ 'type': 'uint128',
5760
+ },
5761
+ ],
4772
5762
  'stateMutability': 'nonpayable',
4773
5763
  'type': 'function',
4774
5764
  },
@@ -4776,16 +5766,26 @@ const environments = {
4776
5766
  'inputs': [
4777
5767
  {
4778
5768
  'internalType': 'address',
4779
- 'name': 'newOwner',
5769
+ 'name': 'to',
4780
5770
  'type': 'address',
4781
5771
  },
5772
+ {
5773
+ 'internalType': 'uint128',
5774
+ 'name': 'amount',
5775
+ 'type': 'uint128',
5776
+ },
5777
+ {
5778
+ 'internalType': 'uint48',
5779
+ 'name': 'depositId',
5780
+ 'type': 'uint48',
5781
+ },
4782
5782
  ],
4783
- 'name': 'transferOwnership',
5783
+ 'name': 'withdrawLiquidityFor',
4784
5784
  'outputs': [],
4785
5785
  'stateMutability': 'nonpayable',
4786
5786
  'type': 'function',
4787
5787
  },
4788
- ];const setupContracts = ({ lp, core, relayer, azuroBet, cashout, }) => {
5788
+ ];var paymasterAbi = [{ 'inputs': [], 'stateMutability': 'nonpayable', 'type': 'constructor' }, { 'inputs': [], 'name': 'AlreadyPaid', 'type': 'error' }, { 'inputs': [], 'name': 'BetDoesNotExist', 'type': 'error' }, { 'inputs': [], 'name': 'IncorrectRelayer', 'type': 'error' }, { 'inputs': [], 'name': 'InsufficientFeeFund', 'type': 'error' }, { 'inputs': [], 'name': 'InsufficientFreeBetFund', 'type': 'error' }, { 'inputs': [], 'name': 'InvalidInitialization', 'type': 'error' }, { 'inputs': [], 'name': 'LpNotMatch', 'type': 'error' }, { 'inputs': [], 'name': 'NotInitializing', 'type': 'error' }, { 'inputs': [], 'name': 'NothingChanged', 'type': 'error' }, { 'inputs': [{ 'internalType': 'address', 'name': 'owner', 'type': 'address' }], 'name': 'OwnableInvalidOwner', 'type': 'error' }, { 'inputs': [{ 'internalType': 'address', 'name': 'account', 'type': 'address' }], 'name': 'OwnableUnauthorizedAccount', 'type': 'error' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'indexed': true, 'internalType': 'address', 'name': 'bettor', 'type': 'address' }, { 'indexed': true, 'internalType': 'uint256', 'name': 'freeBetId', 'type': 'uint256' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256' }], 'name': 'BettorWin', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'affiliate', 'type': 'address' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'freebetAmount', 'type': 'uint256' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'feeAmount', 'type': 'uint256' }], 'name': 'DepositedFunds', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'indexed': true, 'internalType': 'address', 'name': 'bettor', 'type': 'address' }, { 'indexed': true, 'internalType': 'uint256', 'name': 'betId', 'type': 'uint256' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'freeBetId', 'type': 'uint256' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256' }], 'name': 'FreeBetReturned', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': false, 'internalType': 'uint64', 'name': 'version', 'type': 'uint64' }], 'name': 'Initialized', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'uint256', 'name': 'freeBetId', 'type': 'uint256' }, { 'components': [{ 'internalType': 'address', 'name': 'affiliate', 'type': 'address' }, { 'internalType': 'address', 'name': 'owner', 'type': 'address' }, { 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'internalType': 'uint256', 'name': 'azuroBetId', 'type': 'uint256' }, { 'internalType': 'uint128', 'name': 'amount', 'type': 'uint128' }, { 'internalType': 'bool', 'name': 'isReturnableBetAmount', 'type': 'bool' }], 'indexed': false, 'internalType': 'struct IPayMaster.FreeBet', 'name': 'freeBet', 'type': 'tuple' }], 'name': 'NewFreeBet', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'previousOwner', 'type': 'address' }, { 'indexed': true, 'internalType': 'address', 'name': 'newOwner', 'type': 'address' }], 'name': 'OwnershipTransferred', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'relayer', 'type': 'address' }], 'name': 'RelayerChanged', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'relayer', 'type': 'address' }, { 'indexed': true, 'internalType': 'address', 'name': 'affiliate', 'type': 'address' }, { 'indexed': true, 'internalType': 'address', 'name': 'bettor', 'type': 'address' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'amount', 'type': 'uint256' }], 'name': 'RelayerRewarded', 'type': 'event' }, { 'anonymous': false, 'inputs': [{ 'indexed': true, 'internalType': 'address', 'name': 'affiliate', 'type': 'address' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'freebetAmount', 'type': 'uint256' }, { 'indexed': false, 'internalType': 'uint256', 'name': 'feeAmount', 'type': 'uint256' }], 'name': 'WithdrawnFunds', 'type': 'event' }, { 'inputs': [{ 'internalType': 'address', 'name': 'relayer_', 'type': 'address' }], 'name': 'changeRelayer', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'account', 'type': 'address' }, { 'internalType': 'uint256', 'name': 'freeBetAmount', 'type': 'uint256' }, { 'internalType': 'uint256', 'name': 'feeAmount', 'type': 'uint256' }], 'name': 'depositFor', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'name': 'feeFund', 'outputs': [{ 'internalType': 'uint256', 'name': '', 'type': 'uint256' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'uint256', 'name': '', 'type': 'uint256' }], 'name': 'freeBets', 'outputs': [{ 'internalType': 'address', 'name': 'affiliate', 'type': 'address' }, { 'internalType': 'address', 'name': 'owner', 'type': 'address' }, { 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'internalType': 'uint256', 'name': 'azuroBetId', 'type': 'uint256' }, { 'internalType': 'uint128', 'name': 'amount', 'type': 'uint128' }, { 'internalType': 'bool', 'name': 'isReturnableBetAmount', 'type': 'bool' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'name': 'freeBetsFund', 'outputs': [{ 'internalType': 'uint256', 'name': '', 'type': 'uint256' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'lpAddress', 'type': 'address' }], 'name': 'initialize', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'uint256', 'name': '', 'type': 'uint256' }], 'name': 'isLocked', 'outputs': [{ 'internalType': 'bool', 'name': '', 'type': 'bool' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [], 'name': 'lastUsedFreeBetId', 'outputs': [{ 'internalType': 'uint256', 'name': '', 'type': 'uint256' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [], 'name': 'lp', 'outputs': [{ 'internalType': 'contract ILP', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [], 'name': 'owner', 'outputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'relayExecutor', 'type': 'address' }, { 'components': [{ 'internalType': 'address', 'name': 'betOwner', 'type': 'address' }, { 'components': [{ 'internalType': 'uint256', 'name': 'gameId', 'type': 'uint256' }, { 'internalType': 'uint256', 'name': 'conditionId', 'type': 'uint256' }, { 'internalType': 'enum IOrder.ConditionKind', 'name': 'conditionKind', 'type': 'uint8' }, { 'internalType': 'uint64[]', 'name': 'odds', 'type': 'uint64[]' }, { 'internalType': 'uint128[]', 'name': 'outcomes', 'type': 'uint128[]' }, { 'internalType': 'uint128', 'name': 'potentialLossLimit', 'type': 'uint128' }, { 'internalType': 'uint8', 'name': 'winningOutcomesCount', 'type': 'uint8' }], 'internalType': 'struct IOrder.ConditionData[]', 'name': 'conditionDatas', 'type': 'tuple[]' }, { 'internalType': 'enum IOrder.BetType', 'name': 'betType', 'type': 'uint8' }, { 'internalType': 'address', 'name': 'oracle', 'type': 'address' }, { 'internalType': 'bytes', 'name': 'clientBetData', 'type': 'bytes' }, { 'internalType': 'bytes', 'name': 'bettorSignature', 'type': 'bytes' }, { 'internalType': 'bytes', 'name': 'oracleSignature', 'type': 'bytes' }], 'internalType': 'struct IOrder.OrderData', 'name': 'order', 'type': 'tuple' }, { 'components': [{ 'internalType': 'string', 'name': 'attention', 'type': 'string' }, { 'internalType': 'address', 'name': 'affiliate', 'type': 'address' }, { 'internalType': 'address', 'name': 'core', 'type': 'address' }, { 'internalType': 'uint256', 'name': 'expiresAt', 'type': 'uint256' }, { 'internalType': 'uint256', 'name': 'chainId', 'type': 'uint256' }, { 'internalType': 'uint256', 'name': 'relayerFeeAmount', 'type': 'uint256' }, { 'internalType': 'bool', 'name': 'isFeeSponsored', 'type': 'bool' }, { 'internalType': 'bool', 'name': 'isBetSponsored', 'type': 'bool' }, { 'internalType': 'bool', 'name': 'isSponsoredBetReturnable', 'type': 'bool' }], 'internalType': 'struct IOrder.ClientData', 'name': 'data', 'type': 'tuple' }, { 'internalType': 'uint128', 'name': 'betAmount', 'type': 'uint128' }, { 'internalType': 'uint128[]', 'name': 'amounts', 'type': 'uint128[]' }, { 'internalType': 'bytes', 'name': 'hashes', 'type': 'bytes' }], 'name': 'pay', 'outputs': [{ 'internalType': 'uint128', 'name': 'amountPaidByBettor', 'type': 'uint128' }, { 'internalType': 'uint256', 'name': 'feePaidByBettor', 'type': 'uint256' }], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [], 'name': 'relayer', 'outputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [], 'name': 'renounceOwnership', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [], 'name': 'token', 'outputs': [{ 'internalType': 'address', 'name': '', 'type': 'address' }], 'stateMutability': 'view', 'type': 'function' }, { 'inputs': [{ 'internalType': 'address', 'name': 'newOwner', 'type': 'address' }], 'name': 'transferOwnership', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'uint256', 'name': 'freeBetAmount', 'type': 'uint256' }, { 'internalType': 'uint256', 'name': 'feeAmount', 'type': 'uint256' }], 'name': 'withdraw', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }, { 'inputs': [{ 'internalType': 'uint256[]', 'name': 'freeBetIds', 'type': 'uint256[]' }], 'name': 'withdrawPayouts', 'outputs': [], 'stateMutability': 'nonpayable', 'type': 'function' }];const setupContracts = ({ lp, core, relayer, azuroBet, vault, paymaster, cashout, }) => {
4789
5789
  const contracts = {
4790
5790
  lp: {
4791
5791
  address: lp,
@@ -4803,6 +5803,14 @@ const environments = {
4803
5803
  address: azuroBet,
4804
5804
  abi: azuroBetAbi,
4805
5805
  },
5806
+ vault: {
5807
+ address: vault,
5808
+ abi: vaultAbi,
5809
+ },
5810
+ paymaster: {
5811
+ address: paymaster,
5812
+ abi: paymasterAbi,
5813
+ },
4806
5814
  };
4807
5815
  if (cashout) {
4808
5816
  contracts.cashout = {
@@ -4824,7 +5832,7 @@ const environments = {
4824
5832
  // endpointNameByChainId[gnosis.id] = 'gnosis-dev'
4825
5833
  // endpointNameByChainId[polygonAmoy.id] = 'polygon-amoy-dev'
4826
5834
  // }
4827
- const isDev = (chainId) => {
5835
+ const isDevChain = (chainId) => {
4828
5836
  return (chainId === polygonAmoy.id ||
4829
5837
  chainId === spicy.id ||
4830
5838
  chainId === baseSepolia.id);
@@ -4835,7 +5843,7 @@ const getBetsGraphqlEndpoint = (chainId) => (`https://thegraph.onchainfeed.org/s
4835
5843
  * @deprecated Only for v2 feed
4836
5844
  */
4837
5845
  const getLegacyLiveGraphqlEndpoint = (chainId) => {
4838
- if (isDev(chainId)) {
5846
+ if (isDevChain(chainId)) {
4839
5847
  return 'https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed-dev';
4840
5848
  }
4841
5849
  // if (chainId === polygonAmoy.id) {
@@ -4844,7 +5852,7 @@ const getLegacyLiveGraphqlEndpoint = (chainId) => {
4844
5852
  return 'https://thegraph.azuro.org/subgraphs/name/azuro-protocol/azuro-api-live-data-feed';
4845
5853
  };
4846
5854
  const getSocketEndpoint = (chainId) => {
4847
- if (isDev(chainId)) {
5855
+ if (isDevChain(chainId)) {
4848
5856
  return 'wss://dev-streams.onchainfeed.org/v1/streams';
4849
5857
  }
4850
5858
  // if (chainId === polygonAmoy.id) {
@@ -4853,7 +5861,7 @@ const getSocketEndpoint = (chainId) => {
4853
5861
  return 'wss://streams.onchainfeed.org/v1/streams';
4854
5862
  };
4855
5863
  const getApiEndpoint = (chainId) => {
4856
- if (isDev(chainId)) {
5864
+ if (isDevChain(chainId)) {
4857
5865
  return 'https://dev-api.onchainfeed.org/api/v1/public';
4858
5866
  }
4859
5867
  // if (chainId === polygonAmoy.id) {
@@ -4861,7 +5869,6 @@ const getApiEndpoint = (chainId) => {
4861
5869
  // }
4862
5870
  return 'https://api.onchainfeed.org/api/v1/public';
4863
5871
  };const ODDS_DECIMALS = 12;
4864
- const MIN_BET_AMOUNT = 1;
4865
5872
  const CLIENT_DATA_TYPES = [
4866
5873
  { name: 'attention', type: 'string' },
4867
5874
  { name: 'affiliate', type: 'address' },
@@ -4933,6 +5940,8 @@ const gnosisData = {
4933
5940
  core: '0x0e00E6ffcb5E207B800eec9e02999D1Fd9e448f2',
4934
5941
  relayer: '0x40eb85018fA18dDd10a433C8c40ca8D6744d8B32',
4935
5942
  azuroBet: '0xd7cd9342A14962C2dCB14569CB6fcA2759999089',
5943
+ vault: '0x14564e6BbbB8DE2f959af8c0e158D334F05393Bb',
5944
+ paymaster: '0x3Ebf1a2005f1a87862d61022a5BAC661994dD94e',
4936
5945
  cashout: '0x25de227af58188e656524d1C32cCf7C078cdC891',
4937
5946
  }),
4938
5947
  betToken: {
@@ -4956,6 +5965,8 @@ const gnosisDevData = {
4956
5965
  core: '0x12d5E6d2e9c47015C26a7c959a5Db42E3eF5a1Ef',
4957
5966
  relayer: '0x7C9C7B37C93EbC2103061834eb2781809f604eAf',
4958
5967
  azuroBet: '0x9407B57bF56292b0d9940Ed69D9a74ACffb11413',
5968
+ vault: '0xf4cFe9e703fe24E4Bc4c6dc6678e33Bf08d1F629',
5969
+ paymaster: '0x943dD83042572226eFc485AD7Ecc605DFF7D2172',
4959
5970
  cashout: '0xF8E7F2e4693DBEd186b302474EeE5AE4Ab2E0150',
4960
5971
  }),
4961
5972
  betToken: {
@@ -4979,6 +5990,8 @@ const polygonData = {
4979
5990
  core: '0xF9548Be470A4e130c90ceA8b179FCD66D2972AC7',
4980
5991
  relayer: '0x8dA05c0021e6b35865FDC959c54dCeF3A4AbBa9d',
4981
5992
  azuroBet: '0x7A1c3FEf712753374C4DCe34254B96faF2B7265B',
5993
+ vault: '0x1a0612FE7D0Def35559a1f71Ff155e344Ae69d2C',
5994
+ paymaster: '0xeD5760fC2d2f6d363d73e576173e5e8Ca6A877e1',
4982
5995
  cashout: '0x4a2BB4211cCF9b9eA6eF01D0a61448154ED19095',
4983
5996
  }),
4984
5997
  betToken: {
@@ -5025,6 +6038,8 @@ const polygonAmoyData = {
5025
6038
  core: '0xCD0Db5ef28C3Bd3a69283372dE923Eb4DA0585F6',
5026
6039
  relayer: '0x48c9bE88706F22838070eE7C4bC74Ad7A8eeF114',
5027
6040
  azuroBet: '0x4B75c071dFA5d537979E8b0615Bb97B6337dbFef',
6041
+ vault: '0x1Ed6CEEDf7033461a189FD7c3381C34846D7b25a',
6042
+ paymaster: '0x2d155962b708c931Fc695F674B415065E78D9F04',
5028
6043
  cashout: '0x7dF132Ad2334a667A004049a75a4a8a530dc24F2',
5029
6044
  }),
5030
6045
  betToken: {
@@ -5048,6 +6063,8 @@ const chilizData = {
5048
6063
  core: '0xa5061617Ee6565CF48d7f0FEF06910b9fb9dE2b0',
5049
6064
  relayer: '0x81F72B93ABaf061535aaF5D831F05e0CC4084b32',
5050
6065
  azuroBet: '0x3777B4F27F4B36f14454dbB1f79278bcba694B52',
6066
+ vault: '0x32696E01c979E3F542EC49D95729f011eF8F3c28',
6067
+ paymaster: '0xB3AE923721e8f3345654eFffC09f6F52afC21F4c',
5051
6068
  cashout: '0x3995eebB51793Ee353162E7400DB455B17dE3692',
5052
6069
  }),
5053
6070
  betToken: {
@@ -5071,6 +6088,8 @@ const spicyData = {
5071
6088
  core: '0x524994dcA5EA2bc979ac5506E7195F28B4c16932',
5072
6089
  relayer: '0x725ec0A9eC9dC993A86d0eFD7fD78929d226AbE7',
5073
6090
  azuroBet: '0xF7815889e5d0635A31eca34390b25d8D2cEeD902',
6091
+ vault: '0x2d76265b15081581F7ccD116828F35dA654f0a79',
6092
+ paymaster: '0x3df16FB8Dc28F63565AF2815E04a3368360FFd23',
5074
6093
  cashout: '0x7c771a200EcD61A01af992360303f7b1465Cd8e3',
5075
6094
  }),
5076
6095
  betToken: {
@@ -5094,6 +6113,8 @@ const baseSepoliaData = {
5094
6113
  core: '0x679CC42F69F98631668348d088086359D4217Ffa',
5095
6114
  relayer: '0x2De54cABa6A8198D9Dc51931485Bfdc8017aB0c5',
5096
6115
  azuroBet: '0xD031C4BDd4b7c30e3725132109786B8E158A4c07',
6116
+ vault: '0x6910dE58f350CE0A8b42D27004313346A31b3540',
6117
+ paymaster: '0xC2577cdcF684C9756f2C81efdA001CbEFEf3Dd92',
5097
6118
  cashout: '0xf52Eb6ec19d81Ea623A7d7Ad397287C0C40f2F37',
5098
6119
  }),
5099
6120
  betToken: {
@@ -5117,6 +6138,8 @@ const baseData = {
5117
6138
  core: '0xF40cF1dD7d16C098cff5F8B5650A8FaEf1F4640d',
5118
6139
  relayer: '0xD2D508d66dB4fCE4B384e4C3EA2fa53BA43e73b5',
5119
6140
  azuroBet: '0xF328404Dbc8c997d12dC55a1A179AF7F8cb7df90',
6141
+ vault: '0xbA390F464395fC0940c0B9591847ad4E836C7A0c',
6142
+ paymaster: '0x4a2BB4211cCF9b9eA6eF01D0a61448154ED19095',
5120
6143
  cashout: '0x6EDff24761F4473611B45BDAe4a779ff31af14Be',
5121
6144
  }),
5122
6145
  betToken: {
@@ -5155,7 +6178,16 @@ const chainsDataByEnv = {
5155
6178
  BetState["Sent"] = "Sent";
5156
6179
  BetState["Accepted"] = "Accepted";
5157
6180
  BetState["Rejected"] = "Rejected";
5158
- })(BetState || (BetState = {}));const BettorFragmentDoc = gql `
6181
+ })(BetState || (BetState = {}));
6182
+ var BonusType;
6183
+ (function (BonusType) {
6184
+ BonusType["FreeBet"] = "FreeBet";
6185
+ })(BonusType || (BonusType = {}));
6186
+ var BonusStatus;
6187
+ (function (BonusStatus) {
6188
+ BonusStatus["Used"] = "Used";
6189
+ BonusStatus["Available"] = "Available";
6190
+ })(BonusStatus || (BonusStatus = {}));const BettorFragmentDoc = gql `
5159
6191
  fragment Bettor on Bettor {
5160
6192
  id
5161
6193
  rawToPayout
@@ -5263,9 +6295,11 @@ const chainsDataByEnv = {
5263
6295
  }
5264
6296
  }
5265
6297
  league {
6298
+ id
5266
6299
  slug
5267
6300
  name
5268
6301
  country {
6302
+ id
5269
6303
  slug
5270
6304
  name
5271
6305
  }
@@ -5328,10 +6362,9 @@ const chainsDataByEnv = {
5328
6362
  }
5329
6363
  }
5330
6364
  }
5331
- freebet {
5332
- freebetId
5333
- contractAddress: freebetContractAddress
5334
- }
6365
+ freebetId
6366
+ isFreebetAmountReturnable
6367
+ paymasterContractAddress
5335
6368
  cashout {
5336
6369
  payout
5337
6370
  }
@@ -5480,10 +6513,12 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
5480
6513
  }
5481
6514
  }
5482
6515
  league {
6516
+ id
5483
6517
  slug
5484
6518
  name
5485
6519
  }
5486
6520
  country {
6521
+ id
5487
6522
  slug
5488
6523
  name
5489
6524
  }
@@ -5651,9 +6686,11 @@ ${LegacyLiveBetFragmentDoc}`;const GameBetsDocument = gql `
5651
6686
  }
5652
6687
  }
5653
6688
  league {
6689
+ id
5654
6690
  slug
5655
6691
  name
5656
6692
  country {
6693
+ id
5657
6694
  slug
5658
6695
  name
5659
6696
  }
@@ -5944,6 +6981,7 @@ var EventName$1;
5944
6981
  EventName["V3BettorWin"] = "V3_BettorWin";
5945
6982
  EventName["V3ConditionCreated"] = "V3_ConditionCreated";
5946
6983
  EventName["V3ConditionResolved"] = "V3_ConditionResolved";
6984
+ EventName["V3FreebetRedeemed"] = "V3_FreebetRedeemed";
5947
6985
  EventName["V3NewBet"] = "V3_NewBet";
5948
6986
  })(EventName$1 || (EventName$1 = {}));
5949
6987
  var Event_OrderBy$1;
@@ -6319,6 +7357,17 @@ var Sport_OrderBy$1;
6319
7357
  Sport_OrderBy["SportId"] = "sportId";
6320
7358
  Sport_OrderBy["Sporthub"] = "sporthub";
6321
7359
  })(Sport_OrderBy$1 || (Sport_OrderBy$1 = {}));
7360
+ var V3_BetMetadata_OrderBy;
7361
+ (function (V3_BetMetadata_OrderBy) {
7362
+ V3_BetMetadata_OrderBy["FreebetId"] = "freebetId";
7363
+ V3_BetMetadata_OrderBy["FreebetOwner"] = "freebetOwner";
7364
+ V3_BetMetadata_OrderBy["Id"] = "id";
7365
+ V3_BetMetadata_OrderBy["IsFeeSponsored"] = "isFeeSponsored";
7366
+ V3_BetMetadata_OrderBy["IsFreebet"] = "isFreebet";
7367
+ V3_BetMetadata_OrderBy["IsFreebetAmountReturnable"] = "isFreebetAmountReturnable";
7368
+ V3_BetMetadata_OrderBy["PaymasterContractAddress"] = "paymasterContractAddress";
7369
+ V3_BetMetadata_OrderBy["RawRelayerFeeAmount"] = "rawRelayerFeeAmount";
7370
+ })(V3_BetMetadata_OrderBy || (V3_BetMetadata_OrderBy = {}));
6322
7371
  var V3_Bet_OrderBy;
6323
7372
  (function (V3_Bet_OrderBy) {
6324
7373
  V3_Bet_OrderBy["CanceledSubBetsCount"] = "_canceledSubBetsCount";
@@ -6342,14 +7391,19 @@ var V3_Bet_OrderBy;
6342
7391
  V3_Bet_OrderBy["CreatedBlockTimestamp"] = "createdBlockTimestamp";
6343
7392
  V3_Bet_OrderBy["CreatedTxHash"] = "createdTxHash";
6344
7393
  V3_Bet_OrderBy["Freebet"] = "freebet";
7394
+ V3_Bet_OrderBy["FreebetId"] = "freebetId";
7395
+ V3_Bet_OrderBy["FreebetOwner"] = "freebetOwner";
6345
7396
  V3_Bet_OrderBy["Id"] = "id";
6346
7397
  V3_Bet_OrderBy["IsCashedOut"] = "isCashedOut";
7398
+ V3_Bet_OrderBy["IsFeeSponsored"] = "isFeeSponsored";
6347
7399
  V3_Bet_OrderBy["IsFreebet"] = "isFreebet";
7400
+ V3_Bet_OrderBy["IsFreebetAmountReturnable"] = "isFreebetAmountReturnable";
6348
7401
  V3_Bet_OrderBy["IsRedeemable"] = "isRedeemable";
6349
7402
  V3_Bet_OrderBy["IsRedeemed"] = "isRedeemed";
6350
7403
  V3_Bet_OrderBy["Nonce"] = "nonce";
6351
7404
  V3_Bet_OrderBy["Odds"] = "odds";
6352
7405
  V3_Bet_OrderBy["Owner"] = "owner";
7406
+ V3_Bet_OrderBy["PaymasterContractAddress"] = "paymasterContractAddress";
6353
7407
  V3_Bet_OrderBy["Payout"] = "payout";
6354
7408
  V3_Bet_OrderBy["PotentialLossLimit"] = "potentialLossLimit";
6355
7409
  V3_Bet_OrderBy["PotentialPayout"] = "potentialPayout";
@@ -6358,10 +7412,12 @@ var V3_Bet_OrderBy;
6358
7412
  V3_Bet_OrderBy["RawPayout"] = "rawPayout";
6359
7413
  V3_Bet_OrderBy["RawPotentialLossLimit"] = "rawPotentialLossLimit";
6360
7414
  V3_Bet_OrderBy["RawPotentialPayout"] = "rawPotentialPayout";
7415
+ V3_Bet_OrderBy["RawRelayerFeeAmount"] = "rawRelayerFeeAmount";
6361
7416
  V3_Bet_OrderBy["RawSettledOdds"] = "rawSettledOdds";
6362
7417
  V3_Bet_OrderBy["RedeemedBlockNumber"] = "redeemedBlockNumber";
6363
7418
  V3_Bet_OrderBy["RedeemedBlockTimestamp"] = "redeemedBlockTimestamp";
6364
7419
  V3_Bet_OrderBy["RedeemedTxHash"] = "redeemedTxHash";
7420
+ V3_Bet_OrderBy["RelayerFeeAmount"] = "relayerFeeAmount";
6365
7421
  V3_Bet_OrderBy["ResolvedBlockNumber"] = "resolvedBlockNumber";
6366
7422
  V3_Bet_OrderBy["ResolvedBlockTimestamp"] = "resolvedBlockTimestamp";
6367
7423
  V3_Bet_OrderBy["ResolvedTxHash"] = "resolvedTxHash";
@@ -6639,11 +7695,11 @@ var VirtualCondition_OrderBy;
6639
7695
  VirtualCondition_OrderBy["Game"] = "game";
6640
7696
  VirtualCondition_OrderBy["Id"] = "id";
6641
7697
  })(VirtualCondition_OrderBy || (VirtualCondition_OrderBy = {}));
6642
- var VritualGame_OrderBy;
6643
- (function (VritualGame_OrderBy) {
6644
- VritualGame_OrderBy["Conditions"] = "conditions";
6645
- VritualGame_OrderBy["Id"] = "id";
6646
- })(VritualGame_OrderBy || (VritualGame_OrderBy = {}));
7698
+ var VirtualGame_OrderBy;
7699
+ (function (VirtualGame_OrderBy) {
7700
+ VirtualGame_OrderBy["Conditions"] = "conditions";
7701
+ VirtualGame_OrderBy["Id"] = "id";
7702
+ })(VirtualGame_OrderBy || (VirtualGame_OrderBy = {}));
6647
7703
  var _SubgraphErrorPolicy_;
6648
7704
  (function (_SubgraphErrorPolicy_) {
6649
7705
  /** Data will be returned even if the subgraph has indexing errors */
@@ -6825,31 +7881,6 @@ const getBetStatus = (props) => {
6825
7881
  }
6826
7882
  return 0;
6827
7883
  });
6828
- };var FreeBetStatus;
6829
- (function (FreeBetStatus) {
6830
- FreeBetStatus["New"] = "New";
6831
- FreeBetStatus["Claimed"] = "Claimed";
6832
- FreeBetStatus["Redeemed"] = "Redeemed";
6833
- FreeBetStatus["Canceled"] = "Canceled";
6834
- FreeBetStatus["Reissued"] = "Reissued";
6835
- FreeBetStatus["Withdrawn"] = "Withdrawn";
6836
- })(FreeBetStatus || (FreeBetStatus = {}));
6837
- const getFreeBets = async ({ chainId, account, affiliate }) => {
6838
- // const api = getApiEndpoint(chainId!)
6839
- // const params = new URLSearchParams({
6840
- // owner: account.toLowerCase(),
6841
- // affiliate: affiliate,
6842
- // })
6843
- // const response = await fetch(`${api}/freebets/list?${params}`)
6844
- // if (response.status === 404) {
6845
- // return null
6846
- // }
6847
- // if (!response.ok) {
6848
- // throw new Error(`Status ${response.status}: ${response.statusText}`)
6849
- // }
6850
- // const data: FreeBet[] = await response.json()
6851
- // return data
6852
- return [];
6853
7884
  };const getBetTypedData = (props) => {
6854
7885
  const { account, clientData, bet } = props;
6855
7886
  const { chainId, core } = clientData;
@@ -6923,11 +7954,12 @@ const getFreeBets = async ({ chainId, account, affiliate }) => {
6923
7954
  },
6924
7955
  };
6925
7956
  };const createBet = async (props) => {
6926
- const { account, clientData, bet, signature } = props;
7957
+ const { account, clientData, bet, signature, bonusId } = props;
6927
7958
  const { chainId } = clientData;
6928
7959
  const { api, environment } = chainsData[chainId];
6929
7960
  const signedBet = {
6930
7961
  environment,
7962
+ bonusId,
6931
7963
  bettor: account.toLowerCase(),
6932
7964
  betOwner: account.toLowerCase(),
6933
7965
  clientBetData: {
@@ -6963,11 +7995,12 @@ const getFreeBets = async ({ chainId, account, affiliate }) => {
6963
7995
  }
6964
7996
  return data;
6965
7997
  };const createComboBet = async (props) => {
6966
- const { account, amount, minOdds, nonce, clientData, bets, signature } = props;
7998
+ const { account, amount, minOdds, nonce, clientData, bets, signature, bonusId } = props;
6967
7999
  const { chainId } = clientData;
6968
8000
  const { api, environment } = chainsData[chainId];
6969
8001
  const signedBet = {
6970
8002
  environment,
8003
+ bonusId,
6971
8004
  bettor: account.toLowerCase(),
6972
8005
  betOwner: account.toLowerCase(),
6973
8006
  clientBetData: {
@@ -7273,4 +8306,82 @@ const createCashout = async (props) => {
7273
8306
  }
7274
8307
  const data = await response.json();
7275
8308
  return data;
7276
- };export{Aggregation_Interval,BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetResult,BetState,BetStatus,V3_Bet_OrderBy as Bet_OrderBy,BetsDocument,BettorFragmentDoc,BettorsDocument,CASHOUT_DATA_TYPES,CASHOUT_TYPED_DATA_DOMAIN_NAME,CASHOUT_TYPED_DATA_DOMAIN_VERSION,CLIENT_DATA_TYPES,COMBO_BET_DATA_TYPES,CashoutState,ConditionDocument,ConditionFragmentDoc,ConditionState,Condition_OrderBy,ConditionsBatchDocument,ConditionsDocument,Country_OrderBy,Environment,EventName,Event_OrderBy,FreeBetStatus,GameBetsDocument,GameDocument,GameInfoFragmentDoc,GameState,Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,League_OrderBy,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,MIN_BET_AMOUNT,NavigationDocument,ODDS_DECIMALS,OrderDirection,OutcomeResult,Outcome_OrderBy,Participant_OrderBy,V3_SelectionConditionKind as SelectionKind,SelectionResult,SportHub_OrderBy,Sport_OrderBy,SportsDocument,SportsNavigationDocument,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,VirtualCondition_OrderBy,VritualGame_OrderBy,WaveLevelName,_SubgraphErrorPolicy_,activateWave,azuroBetAbi,baseData,baseSepoliaData,calcMindOdds,cashoutAbi,chainsData,chainsDataByEnv,chilizData,coreAbi,createBet,createCashout,createComboBet,environments,FreeBet as freeBetAbi,getApiEndpoint,getBet,getBetFee,getBetStatus,getBetTypedData,getBetsGraphqlEndpoint,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getFeedGraphqlEndpoint,getFreeBets,getIsPendingResolution,getMaxBet,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,gnosisData,gnosisDevData,groupConditionsByMarket,lpAbi,polygonAmoyData,polygonData,relayerAbi,setupContracts,spicyData};
8309
+ };const getBonuses = async ({ chainId, account, affiliate }) => {
8310
+ const { api } = chainsData[chainId];
8311
+ const response = await fetch(`${api}/bonus/get-by-addresses`, {
8312
+ method: 'POST',
8313
+ headers: {
8314
+ 'Accept': 'application/json',
8315
+ 'Content-Type': 'application/json',
8316
+ },
8317
+ body: JSON.stringify({
8318
+ bettorAddress: account,
8319
+ poolAddress: affiliate,
8320
+ }),
8321
+ });
8322
+ if (response.status === 404) {
8323
+ return null;
8324
+ }
8325
+ if (!response.ok) {
8326
+ throw new Error(`Status ${response.status}: ${response.statusText}`);
8327
+ }
8328
+ const { bonuses } = await response.json();
8329
+ return bonuses.reduce((acc, bonus) => {
8330
+ const environment = `${bonus.network}${bonus.currency}`;
8331
+ const { chain, betToken } = chainsDataByEnv[environment];
8332
+ // TODO: need to add environement to request params
8333
+ if (chain.id === chainId) {
8334
+ acc.push({
8335
+ id: bonus.id,
8336
+ amount: formatUnits(BigInt(bonus.amount), betToken.decimals),
8337
+ type: bonus.bonusType,
8338
+ params: bonus.freebetParam,
8339
+ status: bonus.status,
8340
+ chainId: chain.id,
8341
+ expiresAt: +new Date(bonus.expiresAt),
8342
+ usedAt: +new Date(bonus.usedAt),
8343
+ createdAt: +new Date(bonus.createdAt),
8344
+ });
8345
+ }
8346
+ return acc;
8347
+ }, []);
8348
+ };const getAvailableFreebets = async ({ chainId, account, affiliate, selections }) => {
8349
+ const { api, environment, betToken } = chainsData[chainId];
8350
+ const response = await fetch(`${api}/bonus/freebet/get-available`, {
8351
+ method: 'POST',
8352
+ headers: {
8353
+ 'Accept': 'application/json',
8354
+ 'Content-Type': 'application/json',
8355
+ },
8356
+ body: JSON.stringify({
8357
+ environment,
8358
+ bettorAddress: account,
8359
+ poolAddress: affiliate,
8360
+ selections: selections.map(selection => ({
8361
+ conditionId: selection.conditionId,
8362
+ outcomeId: +selection.outcomeId,
8363
+ })),
8364
+ }),
8365
+ });
8366
+ if (response.status === 404) {
8367
+ return null;
8368
+ }
8369
+ if (!response.ok) {
8370
+ throw new Error(`Status ${response.status}: ${response.statusText}`);
8371
+ }
8372
+ const { bonuses } = await response.json();
8373
+ return bonuses.map(bonus => {
8374
+ const environment = `${bonus.network}${bonus.currency}`;
8375
+ return {
8376
+ id: bonus.id,
8377
+ amount: formatUnits(BigInt(bonus.amount), betToken.decimals),
8378
+ type: BonusType.FreeBet,
8379
+ params: bonus.freebetParam,
8380
+ status: bonus.status,
8381
+ chainId: chainsDataByEnv[environment].chain.id,
8382
+ expiresAt: +new Date(bonus.expiresAt),
8383
+ usedAt: +new Date(bonus.usedAt),
8384
+ createdAt: +new Date(bonus.createdAt),
8385
+ };
8386
+ });
8387
+ };export{Aggregation_Interval,BET_DATA_TYPES,ConditionStatus as BetConditionStatus,BetFragmentDoc,BetResult,BetState,BetStatus,V3_Bet_OrderBy as Bet_OrderBy,BetsDocument,BettorFragmentDoc,BettorsDocument,BonusStatus,BonusType,CASHOUT_DATA_TYPES,CASHOUT_TYPED_DATA_DOMAIN_NAME,CASHOUT_TYPED_DATA_DOMAIN_VERSION,CLIENT_DATA_TYPES,COMBO_BET_DATA_TYPES,CashoutState,ConditionDocument,ConditionFragmentDoc,ConditionState,Condition_OrderBy,ConditionsBatchDocument,ConditionsDocument,Country_OrderBy,Environment,EventName,Event_OrderBy,GameBetsDocument,GameDocument,GameInfoFragmentDoc,GameState,Game_OrderBy,GamesDocument,BetStatus$1 as GraphBetStatus,League_OrderBy,LegacyBetsDocument,GameStatus as LegacyGameStatus,LegacyLiveBetFragmentDoc,LegacyLiveGamesDocument,LegacyPrematchBetFragmentDoc,Bet_OrderBy as Legacy_Bet_OrderBy,NavigationDocument,ODDS_DECIMALS,OrderDirection,OutcomeResult,Outcome_OrderBy,Participant_OrderBy,V3_SelectionConditionKind as SelectionKind,SelectionResult,SportHub_OrderBy,Sport_OrderBy,SportsDocument,SportsNavigationDocument,TYPED_DATA_DOMAIN_NAME,TYPED_DATA_DOMAIN_VERSION,VirtualCondition_OrderBy,VirtualGame_OrderBy,WaveLevelName,_SubgraphErrorPolicy_,activateWave,azuroBetAbi,baseData,baseSepoliaData,calcMindOdds,cashoutAbi,chainsData,chainsDataByEnv,chilizData,coreAbi,createBet,createCashout,createComboBet,environments,getApiEndpoint,getAvailableFreebets,getBet,getBetFee,getBetStatus,getBetTypedData,getBetsGraphqlEndpoint,getBonuses,getCalculatedCashout,getCashout,getCashoutTypedData,getComboBetTypedData,getFeedGraphqlEndpoint,getIsPendingResolution,getMaxBet,getPrecalculatedCashouts,getProviderFromId,getSocketEndpoint,getWaveLeaderBoard,getWaveLevels,getWavePeriods,getWaveStats,gnosisData,gnosisDevData,groupConditionsByMarket,lpAbi,paymasterAbi,polygonAmoyData,polygonData,relayerAbi,setupContracts,spicyData,vaultAbi};//# sourceMappingURL=index.js.map