Skip to content

Commit

Permalink
⬆️ Update to new abis
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Jul 1, 2024
1 parent 473b7d2 commit 5953439
Show file tree
Hide file tree
Showing 9 changed files with 1,105 additions and 565 deletions.
170 changes: 117 additions & 53 deletions abis/frak-campaign-abis.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CampaignFactory
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

export const campaignFactoryAbi = [
{
type: "constructor",
inputs: [
{
name: "_referralRegistry",
internalType: "contract ReferralRegistry",
type: "address",
},
{
name: "_frakCampaignWallet",
internalType: "address",
type: "address",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
inputs: [
{ name: "_identifier", internalType: "bytes4", type: "bytes4" },
{ name: "_owner", internalType: "address", type: "address" },
{
name: "_contentInteractionManager",
internalType: "address",
type: "address",
},
{ name: "_initData", internalType: "bytes", type: "bytes" },
],
name: "createCampaign",
outputs: [{ name: "", internalType: "address", type: "address" }],
stateMutability: "nonpayable",
},
{
type: "event",
anonymous: false,
inputs: [
{
name: "campaign",
internalType: "address",
type: "address",
indexed: false,
},
],
name: "CampaignCreated",
},
{
type: "error",
inputs: [
{ name: "identifier", internalType: "bytes4", type: "bytes4" },
],
name: "UnknownCampaignType",
},
] as const;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// InteractionCampaign
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -247,34 +306,56 @@ export const referralCampaignAbi = [
{
type: "constructor",
inputs: [
{ name: "_token", internalType: "address", type: "address" },
{
name: "_explorationLevel",
internalType: "uint256",
type: "uint256",
},
{
name: "_perLevelPercentage",
internalType: "uint256",
type: "uint256",
},
{
name: "_initialReferrerReward",
internalType: "uint256",
type: "uint256",
},
{
name: "_dailyDistributionCap",
internalType: "uint256",
type: "uint256",
name: "_config",
internalType: "struct ReferralCampaign.CampaignConfig",
type: "tuple",
components: [
{ name: "token", internalType: "address", type: "address" },
{
name: "referralTree",
internalType: "bytes32",
type: "bytes32",
},
{
name: "initialReward",
internalType: "uint256",
type: "uint256",
},
{
name: "userRewardPercent",
internalType: "uint256",
type: "uint256",
},
{
name: "distributionCapPeriod",
internalType: "uint256",
type: "uint256",
},
{
name: "distributionCap",
internalType: "uint256",
type: "uint256",
},
{
name: "startDate",
internalType: "uint48",
type: "uint48",
},
{ name: "endDate", internalType: "uint48", type: "uint48" },
],
},
{ name: "_referralTree", internalType: "bytes32", type: "bytes32" },
{
name: "_referralRegistry",
internalType: "contract ReferralRegistry",
type: "address",
},
{ name: "_owner", internalType: "address", type: "address" },
{
name: "_frakCampaignWallet",
internalType: "address",
type: "address",
},
{
name: "_contentInterationManager",
internalType: "address",
Expand Down Expand Up @@ -345,17 +426,14 @@ export const referralCampaignAbi = [
},
{
type: "function",
inputs: [
{ name: "_user", internalType: "address", type: "address" },
{ name: "_token", internalType: "address", type: "address" },
],
inputs: [{ name: "_user", internalType: "address", type: "address" }],
name: "getPendingAmount",
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
stateMutability: "view",
},
{
type: "function",
inputs: [{ name: "_token", internalType: "address", type: "address" }],
inputs: [],
name: "getTotalPending",
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
stateMutability: "view",
Expand Down Expand Up @@ -422,24 +500,11 @@ export const referralCampaignAbi = [
},
{
type: "function",
inputs: [
{ name: "_user", internalType: "address", type: "address" },
{ name: "_token", internalType: "address", type: "address" },
],
inputs: [{ name: "_user", internalType: "address", type: "address" }],
name: "pullReward",
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
inputs: [
{ name: "_user", internalType: "address", type: "address" },
{ name: "_tokens", internalType: "address[]", type: "address[]" },
],
name: "pullRewards",
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
inputs: [],
Expand Down Expand Up @@ -478,6 +543,16 @@ export const referralCampaignAbi = [
outputs: [{ name: "roles", internalType: "uint256", type: "uint256" }],
stateMutability: "view",
},
{
type: "function",
inputs: [
{ name: "startDate", internalType: "uint48", type: "uint48" },
{ name: "endDate", internalType: "uint48", type: "uint48" },
],
name: "setActivationDate",
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
inputs: [
Expand Down Expand Up @@ -524,7 +599,7 @@ export const referralCampaignAbi = [
indexed: false,
},
],
name: "DailyDistrubutionCapReset",
name: "DistributionCapReset",
},
{
type: "event",
Expand Down Expand Up @@ -581,12 +656,6 @@ export const referralCampaignAbi = [
type: "address",
indexed: true,
},
{
name: "token",
internalType: "address",
type: "address",
indexed: true,
},
{
name: "amount",
internalType: "uint256",
Expand All @@ -606,12 +675,6 @@ export const referralCampaignAbi = [
type: "address",
indexed: true,
},
{
name: "token",
internalType: "address",
type: "address",
indexed: true,
},
{
name: "amount",
internalType: "uint256",
Expand Down Expand Up @@ -641,7 +704,8 @@ export const referralCampaignAbi = [
name: "RolesUpdated",
},
{ type: "error", inputs: [], name: "AlreadyInitialized" },
{ type: "error", inputs: [], name: "DailyDistributionCapReached" },
{ type: "error", inputs: [], name: "DistributionCapReached" },
{ type: "error", inputs: [], name: "InactiveCampaign" },
{ type: "error", inputs: [], name: "InvalidConfig" },
{ type: "error", inputs: [], name: "NewOwnerIsZeroAddress" },
{ type: "error", inputs: [], name: "NoHandoverRequest" },
Expand Down
Loading

0 comments on commit 5953439

Please sign in to comment.