diff --git a/challenge-1-vesting/README.md b/challenge-1-vesting/README.md
index 9cc7a2c..2a37056 100644
--- a/challenge-1-vesting/README.md
+++ b/challenge-1-vesting/README.md
@@ -8,9 +8,9 @@ OpenGuild Labs makes the repository to introduce OpenHack workshop participants
Add your information to the below list to officially participate in the workshop challenge (This is the first mission of the whole workshop)
-| Emoji | Name | Github Username | Occupations |
-| ----- | ---- | ------------------------------------- | ----------- |
-| 🎅 | Ippo | [NTP-996](https://github.com/NTP-996) | DevRel |
+| Emoji | Name | Github Username | Occupations |
+| ----- | ------- | ------------------------------------- | ----------------- |
+| 🔧 | marlowl | [marlowl](https://github.com/marlowl) | Software Engineer |
## 💻 Local development environment setup
diff --git a/challenge-1-vesting/contracts/TokenVesting.sol b/challenge-1-vesting/contracts/TokenVesting.sol
index 43d4c3a..f7eadb3 100644
--- a/challenge-1-vesting/contracts/TokenVesting.sol
+++ b/challenge-1-vesting/contracts/TokenVesting.sol
@@ -1,25 +1,3 @@
-// Challenge: Token Vesting Contract
-/*
-Create a token vesting contract with the following requirements:
-
-1. The contract should allow an admin to create vesting schedules for different beneficiaries
-2. Each vesting schedule should have:
- - Total amount of tokens to be vested
- - Cliff period (time before any tokens can be claimed)
- - Vesting duration (total time for all tokens to vest)
- - Start time
-3. After the cliff period, tokens should vest linearly over time
-4. Beneficiaries should be able to claim their vested tokens at any time
-5. Admin should be able to revoke unvested tokens from a beneficiary
-
-Bonus challenges:
-- Add support for multiple token types
-- Implement a whitelist for beneficiaries
-- Add emergency pause functionality
-
-Here's your starter code:
-*/
-
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
@@ -30,18 +8,22 @@ import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
contract TokenVesting is Ownable(msg.sender), Pausable, ReentrancyGuard {
struct VestingSchedule {
- // TODO: Define the vesting schedule struct
+ uint256 totalAmount; // Total amount of tokens to be vested
+ uint256 startTime; // Start time of the vesting schedule
+ uint256 cliffDuration; // Duration of cliff in seconds
+ uint256 vestingDuration; // Duration of vesting in seconds
+ uint256 claimedAmount; // Amount of tokens already claimed
+ bool revoked; // Whether the vesting has been revoked
}
// Token being vested
- // TODO: Add state variables
-
+ IERC20 public token;
- // Mapping from beneficiary to vesting schedule
- // TODO: Add state variables
+ // Mapping from beneficiary to their vesting schedule
+ mapping(address => VestingSchedule) public vestingSchedules;
// Whitelist of beneficiaries
- // TODO: Add state variables
+ mapping(address => bool) public whitelist;
// Events
event VestingScheduleCreated(address indexed beneficiary, uint256 amount);
@@ -51,8 +33,8 @@ contract TokenVesting is Ownable(msg.sender), Pausable, ReentrancyGuard {
event BeneficiaryRemovedFromWhitelist(address indexed beneficiary);
constructor(address tokenAddress) {
- // TODO: Initialize the contract
-
+ require(tokenAddress != address(0), "Invalid token address");
+ token = IERC20(tokenAddress);
}
// Modifier to check if beneficiary is whitelisted
@@ -79,22 +61,126 @@ contract TokenVesting is Ownable(msg.sender), Pausable, ReentrancyGuard {
uint256 vestingDuration,
uint256 startTime
) external onlyOwner onlyWhitelisted(beneficiary) whenNotPaused {
- // TODO: Implement vesting schedule creation
+ require(beneficiary != address(0), "Invalid beneficiary address");
+ require(amount > 0, "Vesting amount must be greater than 0");
+ require(vestingDuration > 0, "Vesting duration must be greater than 0");
+ require(
+ cliffDuration <= vestingDuration,
+ "Cliff duration must be less than or equal to vesting duration"
+ );
+
+ // Use current time if startTime is 0 or in the past
+ uint256 effectiveStartTime = startTime == 0 ||
+ startTime < block.timestamp
+ ? block.timestamp
+ : startTime;
+
+ vestingSchedules[beneficiary] = VestingSchedule({
+ totalAmount: amount,
+ startTime: effectiveStartTime,
+ cliffDuration: cliffDuration,
+ vestingDuration: vestingDuration,
+ claimedAmount: 0,
+ revoked: false
+ });
+
+ // Transfer tokens from sender to contract
+ require(
+ token.transferFrom(msg.sender, address(this), amount),
+ "Token transfer failed"
+ );
+
+ emit VestingScheduleCreated(beneficiary, amount);
}
function calculateVestedAmount(
address beneficiary
) public view returns (uint256) {
- // TODO: Implement vested amount calculation
+ VestingSchedule memory schedule = vestingSchedules[beneficiary];
+
+ // Return 0 if the schedule has been revoked or doesn't exist
+ if (schedule.revoked || schedule.totalAmount == 0) {
+ return 0;
+ }
+
+ uint256 currentTime = block.timestamp;
+ uint256 vestedAmount;
+ uint256 cliffEndTime = schedule.startTime + schedule.cliffDuration;
+ uint256 vestingEndTime = schedule.startTime + schedule.vestingDuration;
+
+ // Return 0 if the cliff hasn't been reached
+ if (currentTime < cliffEndTime) {
+ vestedAmount = 0;
+ }
+ // If vesting is completed, return the total amount
+ else if (currentTime >= vestingEndTime) {
+ vestedAmount = schedule.totalAmount;
+ }
+ // Calculate linearly vested amount based on time passed
+ else {
+ uint256 timeFromStart = currentTime - schedule.startTime;
+ vestedAmount =
+ (schedule.totalAmount * timeFromStart) /
+ schedule.vestingDuration;
+ }
+
+ // Return available amount to claim
+ if (vestedAmount <= schedule.claimedAmount) {
+ return 0;
+ }
+
+ return vestedAmount - schedule.claimedAmount;
}
function claimVestedTokens() external nonReentrant whenNotPaused {
- // TODO: Implement token claiming
+ VestingSchedule storage schedule = vestingSchedules[msg.sender];
+ require(!schedule.revoked, "Vesting has been revoked");
+
+ uint256 claimableAmount = calculateVestedAmount(msg.sender);
+ require(claimableAmount > 0, "No tokens to claim");
+
+ schedule.claimedAmount += claimableAmount;
+
+ require(
+ token.transfer(msg.sender, claimableAmount),
+ "Token transfer failed"
+ );
+
+ emit TokensClaimed(msg.sender, claimableAmount);
}
function revokeVesting(address beneficiary) external onlyOwner {
- // TODO: Implement vesting revocation
-
+ VestingSchedule storage schedule = vestingSchedules[beneficiary];
+ require(!schedule.revoked, "Vesting already revoked");
+ require(schedule.totalAmount > 0, "No vesting schedule found");
+
+ uint256 currentTime = block.timestamp;
+ uint256 vestedAmount;
+ uint256 cliffEndTime = schedule.startTime + schedule.cliffDuration;
+ uint256 vestingEndTime = schedule.startTime + schedule.vestingDuration;
+
+ if (currentTime < cliffEndTime) {
+ vestedAmount = 0;
+ } else if (currentTime >= vestingEndTime) {
+ vestedAmount = schedule.totalAmount;
+ } else {
+ vestedAmount =
+ (schedule.totalAmount * (currentTime - schedule.startTime)) /
+ schedule.vestingDuration;
+ }
+
+ uint256 unvestedAmount = schedule.totalAmount - vestedAmount;
+
+ // Mark schedule as revoked
+ schedule.revoked = true;
+
+ // Return unvested tokens to owner
+ require(
+ token.transfer(owner(), unvestedAmount),
+ "Token transfer failed"
+ );
+
+ emit VestingRevoked(beneficiary);
}
function pause() external onlyOwner {
@@ -105,44 +191,3 @@ contract TokenVesting is Ownable(msg.sender), Pausable, ReentrancyGuard {
_unpause();
}
}
-
-/*
-Solution template (key points to implement):
-
-1. VestingSchedule struct should contain:
- - Total amount
- - Start time
- - Cliff duration
- - Vesting duration
- - Amount claimed
- - Revoked status
-
-2. State variables needed:
- - Mapping of beneficiary address to VestingSchedule
- - ERC20 token reference
- - Owner/admin address
-
-3. createVestingSchedule should:
- - Validate input parameters
- - Create new vesting schedule
- - Transfer tokens to contract
- - Emit event
-
-4. calculateVestedAmount should:
- - Check if cliff period has passed
- - Calculate linear vesting based on time passed
- - Account for already claimed tokens
- - Handle revoked status
-
-5. claimVestedTokens should:
- - Calculate claimable amount
- - Update claimed amount
- - Transfer tokens
- - Emit event
-
-6. revokeVesting should:
- - Only allow admin
- - Calculate and transfer unvested tokens back
- - Mark schedule as revoked
- - Emit event
-*/
\ No newline at end of file
diff --git a/challenge-2-yield-farm/contracts/yeild.sol b/challenge-2-yield-farm/contracts/yeild.sol
index 421496a..8f2c66c 100644
--- a/challenge-2-yield-farm/contracts/yeild.sol
+++ b/challenge-2-yield-farm/contracts/yeild.sol
@@ -57,8 +57,6 @@ contract YieldFarm is ReentrancyGuard, Ownable {
event RewardsClaimed(address indexed user, uint256 amount);
event EmergencyWithdrawn(address indexed user, uint256 amount);
- // TODO: Implement the following functions
-
/**
* @notice Initialize the contract with the LP token and reward token addresses
* @param _lpToken Address of the LP token
@@ -70,7 +68,10 @@ contract YieldFarm is ReentrancyGuard, Ownable {
address _rewardToken,
uint256 _rewardRate
) Ownable(msg.sender) {
- // TODO: Initialize contract state
+ lpToken = IERC20(_lpToken);
+ rewardToken = IERC20(_rewardToken);
+ rewardRate = _rewardRate;
+ lastUpdateTime = block.timestamp;
}
function updateReward(address _user) internal {
@@ -85,19 +86,24 @@ contract YieldFarm is ReentrancyGuard, Ownable {
}
function rewardPerToken() public view returns (uint256) {
- // TODO: Implement pending rewards calculation
- // Requirements:
- // 1. Calculate rewards since last update
- // 2. Apply boost multiplier
- // 3. Return total pending rewards
+ if (totalStaked == 0) {
+ return rewardPerTokenStored;
+ }
+ return
+ rewardPerTokenStored +
+ (((block.timestamp - lastUpdateTime) * rewardRate * 1e18) /
+ totalStaked);
}
function earned(address _user) public view returns (uint256) {
- // TODO: Implement pending rewards calculation
- // Requirements:
- // 1. Calculate rewards since last update
- // 2. Apply boost multiplier
- // 3. Return total pending rewards
+ UserInfo storage user = userInfo[_user];
+
+ uint256 newReward = (user.amount *
+ (rewardPerToken() - user.rewardDebt)) / 1e18;
+
+ uint256 boost = calculateBoostMultiplier(_user);
+ newReward = (newReward * boost) / 100;
+ return user.pendingRewards + newReward;
}
/**
@@ -105,12 +111,30 @@ contract YieldFarm is ReentrancyGuard, Ownable {
* @param _amount Amount of LP tokens to stake
*/
function stake(uint256 _amount) external nonReentrant {
- // TODO: Implement staking logic
- // Requirements:
- // 1. Update rewards
- // 2. Transfer LP tokens from user
- // 3. Update user info and total staked amount
- // 4. Emit Staked event
+ require(_amount > 0, "Cannot stake 0");
+
+ // Update the reward information for the user
+ updateReward(msg.sender);
+
+ // If the user has no previous stake, set the start time
+ if (userInfo[msg.sender].amount == 0) {
+ userInfo[msg.sender].startTime = block.timestamp;
+ }
+
+ // Transfer LP tokens from the user to this contract
+ lpToken.transferFrom(msg.sender, address(this), _amount);
+
+ // Increase the user's staked amount and update the global total
+ userInfo[msg.sender].amount += _amount;
+ totalStaked += _amount;
+
+ // Update reward debt to the new total amount
+ userInfo[msg.sender].rewardDebt =
+ (userInfo[msg.sender].amount * rewardPerTokenStored) /
+ 1e18;
+
+ // Emit the staking event
+ emit Staked(msg.sender, _amount);
}
/**
@@ -118,35 +142,55 @@ contract YieldFarm is ReentrancyGuard, Ownable {
* @param _amount Amount of LP tokens to withdraw
*/
function withdraw(uint256 _amount) external nonReentrant {
- // TODO: Implement withdrawal logic
- // Requirements:
- // 1. Update rewards
- // 2. Transfer LP tokens to user
- // 3. Update user info and total staked amount
- // 4. Emit Withdrawn event
+ updateReward(msg.sender);
+
+ require(userInfo[msg.sender].amount >= _amount, "Insufficient balance");
+
+ userInfo[msg.sender].amount -= _amount;
+ totalStaked -= _amount;
+
+ userInfo[msg.sender].rewardDebt =
+ (userInfo[msg.sender].amount * rewardPerTokenStored) /
+ 1e18;
+
+ lpToken.transfer(msg.sender, _amount);
+
+ emit Withdrawn(msg.sender, _amount);
}
/**
* @notice Claim pending rewards
*/
function claimRewards() external nonReentrant {
- // TODO: Implement reward claiming logic
- // Requirements:
- // 1. Calculate pending rewards with boost multiplier
- // 2. Transfer rewards to user
- // 3. Update user reward debt
- // 4. Emit RewardsClaimed event
+ updateReward(msg.sender);
+
+ uint256 rewards = userInfo[msg.sender].pendingRewards;
+ require(rewards > 0, "No rewards to claim");
+
+ userInfo[msg.sender].pendingRewards = 0;
+
+ rewardToken.transfer(msg.sender, rewards);
+
+ emit RewardsClaimed(msg.sender, rewards);
}
/**
* @notice Emergency withdraw without caring about rewards
*/
function emergencyWithdraw() external nonReentrant {
- // TODO: Implement emergency withdrawal
- // Requirements:
- // 1. Transfer all LP tokens back to user
- // 2. Reset user info
- // 3. Emit EmergencyWithdrawn event
+ UserInfo storage user = userInfo[msg.sender];
+ uint256 amount = user.amount;
+ require(amount > 0, "No tokens to withdraw");
+
+ user.amount = 0;
+ user.pendingRewards = 0;
+ user.rewardDebt = 0;
+
+ totalStaked -= amount;
+
+ lpToken.transfer(msg.sender, amount);
+
+ emit EmergencyWithdrawn(msg.sender, amount);
}
/**
@@ -157,10 +201,15 @@ contract YieldFarm is ReentrancyGuard, Ownable {
function calculateBoostMultiplier(
address _user
) public view returns (uint256) {
- // TODO: Implement boost multiplier calculation
- // Requirements:
- // 1. Calculate staking duration
- // 2. Return appropriate multiplier based on duration thresholds
+ uint256 stakedDuration = block.timestamp - userInfo[_user].startTime;
+ if (stakedDuration >= BOOST_THRESHOLD_3) {
+ return 200; // 2x boost
+ } else if (stakedDuration >= BOOST_THRESHOLD_2) {
+ return 150; // 1.5x boost
+ } else if (stakedDuration >= BOOST_THRESHOLD_1) {
+ return 125; // 1.25x boost
+ }
+ return 100; // 1x boost (no boost)
}
/**
@@ -168,10 +217,9 @@ contract YieldFarm is ReentrancyGuard, Ownable {
* @param _newRate New reward rate per second
*/
function updateRewardRate(uint256 _newRate) external onlyOwner {
- // TODO: Implement reward rate update logic
- // Requirements:
- // 1. Update rewards before changing rate
- // 2. Set new reward rate
+ updateReward(address(0));
+
+ rewardRate = _newRate;
}
/**
diff --git a/challenge-2-yield-farm/hardhat.config.ts b/challenge-2-yield-farm/hardhat.config.ts
index 24ee97a..27e9777 100644
--- a/challenge-2-yield-farm/hardhat.config.ts
+++ b/challenge-2-yield-farm/hardhat.config.ts
@@ -1,7 +1,9 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-ignition";
-import "dotenv/config";
+import * as dotenv from "dotenv";
+
+dotenv.config();
const config: HardhatUserConfig = {
solidity: {
diff --git a/challenge-2-yield-farm/package-lock.json b/challenge-2-yield-farm/package-lock.json
index 4cbdfb0..e224581 100644
--- a/challenge-2-yield-farm/package-lock.json
+++ b/challenge-2-yield-farm/package-lock.json
@@ -9,7 +9,8 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
- "@openzeppelin/contracts": "^5.1.0"
+ "@openzeppelin/contracts": "^5.1.0",
+ "dotenv": "^16.4.7"
},
"devDependencies": {
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
@@ -3383,6 +3384,18 @@
"node": ">=8"
}
},
+ "node_modules/dotenv": {
+ "version": "16.4.7",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
+ "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
"node_modules/dunder-proto": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz",
diff --git a/challenge-2-yield-farm/package.json b/challenge-2-yield-farm/package.json
index 5366ac8..51ad4b9 100644
--- a/challenge-2-yield-farm/package.json
+++ b/challenge-2-yield-farm/package.json
@@ -17,6 +17,7 @@
"hardhat": "^2.22.17"
},
"dependencies": {
- "@openzeppelin/contracts": "^5.1.0"
+ "@openzeppelin/contracts": "^5.1.0",
+ "dotenv": "^16.4.7"
}
}
diff --git a/challenge-3-frontend/app/page.tsx b/challenge-3-frontend/app/page.tsx
index fb01185..a8006fa 100644
--- a/challenge-3-frontend/app/page.tsx
+++ b/challenge-3-frontend/app/page.tsx
@@ -23,6 +23,9 @@ export default function Home() {
Write contract
+
+ Token Vesting
+
Mint/Redeem LST Bifrost
@@ -102,7 +105,24 @@ export default function Home() {
diff --git a/challenge-3-frontend/components/navbar.tsx b/challenge-3-frontend/components/navbar.tsx
index d212169..09c994e 100644
--- a/challenge-3-frontend/components/navbar.tsx
+++ b/challenge-3-frontend/components/navbar.tsx
@@ -21,6 +21,12 @@ export default function Navbar() {
>
Write contract
+
+ Token Vesting
+
isAddress(val), {
+ message: "Invalid address format",
+ }) as z.ZodType,
+ });
+
+ // Define the form
+ const form = useForm>({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ beneficiary: zeroAddress, // Use zeroAddress as default instead of empty string
+ },
+ });
+
+ // Update the onSubmit function to use getSigpassWallet consistently
+ async function onSubmit(values: z.infer) {
+ try {
+ if (address) {
+ // Using SigPass wallet
+ const sigpassWallet = await getSigpassWallet();
+ if (!sigpassWallet) {
+ toast({
+ title: "Wallet Error",
+ description: "Failed to retrieve SigPass wallet.",
+ variant: "destructive",
+ });
+ return;
+ }
+
+ const approval = window.confirm(
+ `Do you want to approve adding ${values.beneficiary} to the whitelist?`
+ );
+
+ if (!approval) {
+ toast({
+ title: "Approval Denied",
+ description:
+ "You denied the approval to add the address to the whitelist.",
+ variant: "destructive",
+ });
+ return;
+ }
+
+ await writeContractAsync({
+ account: sigpassWallet,
+ address: TOKEN_VESTING_CONTRACT_ADDRESS,
+ abi: tokenVestingAbi,
+ functionName: "addToWhitelist",
+ args: [values.beneficiary],
+ chainId: westendAssetHub.id,
+ });
+ } else {
+ // Fallback to connected wallet
+ const approval = window.confirm(
+ `Do you want to approve adding ${values.beneficiary} to the whitelist?`
+ );
+
+ if (!approval) {
+ toast({
+ title: "Approval Denied",
+ description:
+ "You denied the approval to add the address to the whitelist.",
+ variant: "destructive",
+ });
+ return;
+ }
+
+ await writeContractAsync({
+ address: TOKEN_VESTING_CONTRACT_ADDRESS,
+ abi: tokenVestingAbi,
+ functionName: "addToWhitelist",
+ args: [values.beneficiary],
+ chainId: westendAssetHub.id,
+ });
+ }
+ } catch (e) {
+ console.error("Error adding to whitelist:", e);
+ toast({
+ title: "Failed to add to whitelist",
+ description: "There was an error adding the address to the whitelist",
+ variant: "destructive",
+ });
+ }
+ }
+
+ // Watch for transaction hash and open dialog/drawer when received
+ useEffect(() => {
+ if (hash) {
+ setOpen(true);
+ }
+ }, [hash]);
+
+ // useWaitForTransactionReceipt hook to wait for transaction receipt
+ const { isLoading: isConfirming, isSuccess: isConfirmed } =
+ useWaitForTransactionReceipt({
+ hash,
+ config: address ? localConfig : config,
+ });
+
+ // After confirmation, display success toast
+ useEffect(() => {
+ if (isConfirmed) {
+ toast({
+ title: "Address added to whitelist",
+ description: "The address has been successfully added to the whitelist",
+ variant: "default",
+ });
+ }
+ }, [isConfirmed, toast]);
+
+ return (
+
+
+
Add to Whitelist
+
+ Add an address to the token vesting whitelist. Only the contract owner
+ can add addresses.
+
+
+
+
+
+
+ {isDesktop ? (
+
+ ) : (
+
+
+
+ Transaction Status
+
+ View the status of your transaction.
+
+
+
+
+
Transaction Hash:
+
+
+ {hash ? truncateHash(hash) : "N/A"}
+
+ {hash && }
+
+
+
+
Status:
+
+ {isConfirming && (
+
+
+ Confirming...
+
+ )}
+ {isConfirmed && (
+
+
+ Confirmed!
+
+ )}
+ {error && (
+
+
+ Error!
+
+ )}
+
+
+
+
Blockchain:
+
+ {westendAssetHub.name}
+
+
+
+
+
+ {hash && (
+
+
+
+ )}
+
+
+
+ )}
+
+ );
+}
diff --git a/challenge-3-frontend/lib/abi.ts b/challenge-3-frontend/lib/abi.ts
index 78ac757..55f5432 100644
--- a/challenge-3-frontend/lib/abi.ts
+++ b/challenge-3-frontend/lib/abi.ts
@@ -1,2419 +1,2518 @@
// ERC-20 token ABI
export const erc20Abi = [
- {
- inputs: [
- {
- internalType: "address",
- name: "initialOwner",
- type: "address",
- },
- ],
- stateMutability: "nonpayable",
- type: "constructor",
- },
- {
- inputs: [],
- name: "ECDSAInvalidSignature",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "length",
- type: "uint256",
- },
- ],
- name: "ECDSAInvalidSignatureLength",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "bytes32",
- name: "s",
- type: "bytes32",
- },
- ],
- name: "ECDSAInvalidSignatureS",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "allowance",
- type: "uint256",
- },
- {
- internalType: "uint256",
- name: "needed",
- type: "uint256",
- },
- ],
- name: "ERC20InsufficientAllowance",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "sender",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "balance",
- type: "uint256",
- },
- {
- internalType: "uint256",
- name: "needed",
- type: "uint256",
- },
- ],
- name: "ERC20InsufficientBalance",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "approver",
- type: "address",
- },
- ],
- name: "ERC20InvalidApprover",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "receiver",
- type: "address",
- },
- ],
- name: "ERC20InvalidReceiver",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "sender",
- type: "address",
- },
- ],
- name: "ERC20InvalidSender",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- ],
- name: "ERC20InvalidSpender",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "deadline",
- type: "uint256",
- },
- ],
- name: "ERC2612ExpiredSignature",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "signer",
- type: "address",
- },
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- ],
- name: "ERC2612InvalidSigner",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "maxLoan",
- type: "uint256",
- },
- ],
- name: "ERC3156ExceededMaxLoan",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "receiver",
- type: "address",
- },
- ],
- name: "ERC3156InvalidReceiver",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "token",
- type: "address",
- },
- ],
- name: "ERC3156UnsupportedToken",
- type: "error",
- },
- {
- inputs: [],
- name: "EnforcedPause",
- type: "error",
- },
- {
- inputs: [],
- name: "ExpectedPause",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "account",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "currentNonce",
- type: "uint256",
- },
- ],
- name: "InvalidAccountNonce",
- type: "error",
- },
- {
- inputs: [],
- name: "InvalidShortString",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- ],
- name: "OwnableInvalidOwner",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "account",
- type: "address",
- },
- ],
- name: "OwnableUnauthorizedAccount",
- type: "error",
- },
- {
- inputs: [
- {
- internalType: "string",
- name: "str",
- type: "string",
- },
- ],
- name: "StringTooLong",
- type: "error",
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: "address",
- name: "owner",
- type: "address",
- },
- {
- indexed: true,
- internalType: "address",
- name: "spender",
- type: "address",
- },
- {
- indexed: false,
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "Approval",
- type: "event",
- },
- {
- anonymous: false,
- inputs: [],
- name: "EIP712DomainChanged",
- 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: "address",
- name: "account",
- type: "address",
- },
- ],
- name: "Paused",
- type: "event",
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- internalType: "address",
- name: "from",
- type: "address",
- },
- {
- indexed: true,
- internalType: "address",
- name: "to",
- type: "address",
- },
- {
- indexed: false,
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "Transfer",
- type: "event",
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- internalType: "address",
- name: "account",
- type: "address",
- },
- ],
- name: "Unpaused",
- type: "event",
- },
- {
- inputs: [],
- name: "DOMAIN_SEPARATOR",
- outputs: [
- {
- internalType: "bytes32",
- name: "",
- type: "bytes32",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- ],
- name: "allowance",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "approve",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "account",
- type: "address",
- },
- ],
- name: "balanceOf",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "burn",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "account",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "burnFrom",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "decimals",
- outputs: [
- {
- internalType: "uint8",
- name: "",
- type: "uint8",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "eip712Domain",
- outputs: [
- {
- internalType: "bytes1",
- name: "fields",
- type: "bytes1",
- },
- {
- internalType: "string",
- name: "name",
- type: "string",
- },
- {
- internalType: "string",
- name: "version",
- type: "string",
- },
- {
- internalType: "uint256",
- name: "chainId",
- type: "uint256",
- },
- {
- internalType: "address",
- name: "verifyingContract",
- type: "address",
- },
- {
- internalType: "bytes32",
- name: "salt",
- type: "bytes32",
- },
- {
- internalType: "uint256[]",
- name: "extensions",
- type: "uint256[]",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "token",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "flashFee",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "contract IERC3156FlashBorrower",
- name: "receiver",
- type: "address",
- },
- {
- internalType: "address",
- name: "token",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- {
- internalType: "bytes",
- name: "data",
- type: "bytes",
- },
- ],
- name: "flashLoan",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "token",
- type: "address",
- },
- ],
- name: "maxFlashLoan",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "to",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "amount",
- type: "uint256",
- },
- ],
- name: "mint",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "name",
- outputs: [
- {
- internalType: "string",
- name: "",
- type: "string",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- ],
- name: "nonces",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "owner",
- outputs: [
- {
- internalType: "address",
- name: "",
- type: "address",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "pause",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "paused",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "owner",
- type: "address",
- },
- {
- internalType: "address",
- name: "spender",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- {
- internalType: "uint256",
- name: "deadline",
- type: "uint256",
- },
- {
- internalType: "uint8",
- name: "v",
- type: "uint8",
- },
- {
- internalType: "bytes32",
- name: "r",
- type: "bytes32",
- },
- {
- internalType: "bytes32",
- name: "s",
- type: "bytes32",
- },
- ],
- name: "permit",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "renounceOwnership",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "symbol",
- outputs: [
- {
- internalType: "string",
- name: "",
- type: "string",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [],
- name: "totalSupply",
- outputs: [
- {
- internalType: "uint256",
- name: "",
- type: "uint256",
- },
- ],
- stateMutability: "view",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "to",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "transfer",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "from",
- type: "address",
- },
- {
- internalType: "address",
- name: "to",
- type: "address",
- },
- {
- internalType: "uint256",
- name: "value",
- type: "uint256",
- },
- ],
- name: "transferFrom",
- outputs: [
- {
- internalType: "bool",
- name: "",
- type: "bool",
- },
- ],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [
- {
- internalType: "address",
- name: "newOwner",
- type: "address",
- },
- ],
- name: "transferOwnership",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
- {
- inputs: [],
- name: "unpause",
- outputs: [],
- stateMutability: "nonpayable",
- type: "function",
- },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "initialOwner",
+ type: "address",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "constructor",
+ },
+ {
+ inputs: [],
+ name: "ECDSAInvalidSignature",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "length",
+ type: "uint256",
+ },
+ ],
+ name: "ECDSAInvalidSignatureLength",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "bytes32",
+ name: "s",
+ type: "bytes32",
+ },
+ ],
+ name: "ECDSAInvalidSignatureS",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "allowance",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "needed",
+ type: "uint256",
+ },
+ ],
+ name: "ERC20InsufficientAllowance",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "sender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "balance",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "needed",
+ type: "uint256",
+ },
+ ],
+ name: "ERC20InsufficientBalance",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "approver",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidApprover",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidReceiver",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "sender",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidSender",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidSpender",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "deadline",
+ type: "uint256",
+ },
+ ],
+ name: "ERC2612ExpiredSignature",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "signer",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "ERC2612InvalidSigner",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "maxLoan",
+ type: "uint256",
+ },
+ ],
+ name: "ERC3156ExceededMaxLoan",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ ],
+ name: "ERC3156InvalidReceiver",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "ERC3156UnsupportedToken",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "EnforcedPause",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "ExpectedPause",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "currentNonce",
+ type: "uint256",
+ },
+ ],
+ name: "InvalidAccountNonce",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "InvalidShortString",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "OwnableInvalidOwner",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "OwnableUnauthorizedAccount",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "string",
+ name: "str",
+ type: "string",
+ },
+ ],
+ name: "StringTooLong",
+ type: "error",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ indexed: true,
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "Approval",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [],
+ name: "EIP712DomainChanged",
+ 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: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "Paused",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "from",
+ type: "address",
+ },
+ {
+ indexed: true,
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "Transfer",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "Unpaused",
+ type: "event",
+ },
+ {
+ inputs: [],
+ name: "DOMAIN_SEPARATOR",
+ outputs: [
+ {
+ internalType: "bytes32",
+ name: "",
+ type: "bytes32",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ ],
+ name: "allowance",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "approve",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "balanceOf",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "burn",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "burnFrom",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "decimals",
+ outputs: [
+ {
+ internalType: "uint8",
+ name: "",
+ type: "uint8",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "eip712Domain",
+ outputs: [
+ {
+ internalType: "bytes1",
+ name: "fields",
+ type: "bytes1",
+ },
+ {
+ internalType: "string",
+ name: "name",
+ type: "string",
+ },
+ {
+ internalType: "string",
+ name: "version",
+ type: "string",
+ },
+ {
+ internalType: "uint256",
+ name: "chainId",
+ type: "uint256",
+ },
+ {
+ internalType: "address",
+ name: "verifyingContract",
+ type: "address",
+ },
+ {
+ internalType: "bytes32",
+ name: "salt",
+ type: "bytes32",
+ },
+ {
+ internalType: "uint256[]",
+ name: "extensions",
+ type: "uint256[]",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "flashFee",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "contract IERC3156FlashBorrower",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ {
+ internalType: "bytes",
+ name: "data",
+ type: "bytes",
+ },
+ ],
+ name: "flashLoan",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "maxFlashLoan",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "amount",
+ type: "uint256",
+ },
+ ],
+ name: "mint",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "name",
+ outputs: [
+ {
+ internalType: "string",
+ name: "",
+ type: "string",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "nonces",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "owner",
+ outputs: [
+ {
+ internalType: "address",
+ name: "",
+ type: "address",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "pause",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "paused",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "deadline",
+ type: "uint256",
+ },
+ {
+ internalType: "uint8",
+ name: "v",
+ type: "uint8",
+ },
+ {
+ internalType: "bytes32",
+ name: "r",
+ type: "bytes32",
+ },
+ {
+ internalType: "bytes32",
+ name: "s",
+ type: "bytes32",
+ },
+ ],
+ name: "permit",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "renounceOwnership",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "symbol",
+ outputs: [
+ {
+ internalType: "string",
+ name: "",
+ type: "string",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "totalSupply",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "transfer",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "from",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "transferFrom",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "newOwner",
+ type: "address",
+ },
+ ],
+ name: "transferOwnership",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "unpause",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
];
-// ERC-20 token ABI Extend
+// ERC-20 token ABI Extend
export const erc20AbiExtend = [
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "initialOwner",
- "type": "address"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "constructor"
- },
- {
- "inputs": [],
- "name": "ECDSAInvalidSignature",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "length",
- "type": "uint256"
- }
- ],
- "name": "ECDSAInvalidSignatureLength",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "bytes32",
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "ECDSAInvalidSignatureS",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "allowance",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "needed",
- "type": "uint256"
- }
- ],
- "name": "ERC20InsufficientAllowance",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "sender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "balance",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "needed",
- "type": "uint256"
- }
- ],
- "name": "ERC20InsufficientBalance",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "approver",
- "type": "address"
- }
- ],
- "name": "ERC20InvalidApprover",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- }
- ],
- "name": "ERC20InvalidReceiver",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "sender",
- "type": "address"
- }
- ],
- "name": "ERC20InvalidSender",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- }
- ],
- "name": "ERC20InvalidSpender",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "deadline",
- "type": "uint256"
- }
- ],
- "name": "ERC2612ExpiredSignature",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "signer",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- }
- ],
- "name": "ERC2612InvalidSigner",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "maxLoan",
- "type": "uint256"
- }
- ],
- "name": "ERC3156ExceededMaxLoan",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- }
- ],
- "name": "ERC3156InvalidReceiver",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "token",
- "type": "address"
- }
- ],
- "name": "ERC3156UnsupportedToken",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "EnforcedPause",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "ExpectedPause",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "currentNonce",
- "type": "uint256"
- }
- ],
- "name": "InvalidAccountNonce",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "InvalidShortString",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- }
- ],
- "name": "OwnableInvalidOwner",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "OwnableUnauthorizedAccount",
- "type": "error"
- },
- {
- "inputs": [
- {
- "internalType": "string",
- "name": "str",
- "type": "string"
- }
- ],
- "name": "StringTooLong",
- "type": "error"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [],
- "name": "EIP712DomainChanged",
- "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": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "Paused",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "Unpaused",
- "type": "event"
- },
- {
- "inputs": [],
- "name": "DOMAIN_SEPARATOR",
- "outputs": [
- {
- "internalType": "bytes32",
- "name": "",
- "type": "bytes32"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "burn",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "account",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "burnFrom",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "decimals",
- "outputs": [
- {
- "internalType": "uint8",
- "name": "",
- "type": "uint8"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "eip712Domain",
- "outputs": [
- {
- "internalType": "bytes1",
- "name": "fields",
- "type": "bytes1"
- },
- {
- "internalType": "string",
- "name": "name",
- "type": "string"
- },
- {
- "internalType": "string",
- "name": "version",
- "type": "string"
- },
- {
- "internalType": "uint256",
- "name": "chainId",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "verifyingContract",
- "type": "address"
- },
- {
- "internalType": "bytes32",
- "name": "salt",
- "type": "bytes32"
- },
- {
- "internalType": "uint256[]",
- "name": "extensions",
- "type": "uint256[]"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "token",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "flashFee",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "contract IERC3156FlashBorrower",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "token",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- },
- {
- "internalType": "bytes",
- "name": "data",
- "type": "bytes"
- }
- ],
- "name": "flashLoan",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "token",
- "type": "address"
- }
- ],
- "name": "maxFlashLoan",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "mint",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- }
- ],
- "name": "nonces",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "pause",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "paused",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "owner",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "spender",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "deadline",
- "type": "uint256"
- },
- {
- "internalType": "uint8",
- "name": "v",
- "type": "uint8"
- },
- {
- "internalType": "bytes32",
- "name": "r",
- "type": "bytes32"
- },
- {
- "internalType": "bytes32",
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "permit",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "internalType": "string",
- "name": "",
- "type": "string"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "to",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "unpause",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "initialOwner",
+ type: "address",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "constructor",
+ },
+ {
+ inputs: [],
+ name: "ECDSAInvalidSignature",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "length",
+ type: "uint256",
+ },
+ ],
+ name: "ECDSAInvalidSignatureLength",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "bytes32",
+ name: "s",
+ type: "bytes32",
+ },
+ ],
+ name: "ECDSAInvalidSignatureS",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "allowance",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "needed",
+ type: "uint256",
+ },
+ ],
+ name: "ERC20InsufficientAllowance",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "sender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "balance",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "needed",
+ type: "uint256",
+ },
+ ],
+ name: "ERC20InsufficientBalance",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "approver",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidApprover",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidReceiver",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "sender",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidSender",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ ],
+ name: "ERC20InvalidSpender",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "deadline",
+ type: "uint256",
+ },
+ ],
+ name: "ERC2612ExpiredSignature",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "signer",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "ERC2612InvalidSigner",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "maxLoan",
+ type: "uint256",
+ },
+ ],
+ name: "ERC3156ExceededMaxLoan",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ ],
+ name: "ERC3156InvalidReceiver",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "ERC3156UnsupportedToken",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "EnforcedPause",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "ExpectedPause",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "currentNonce",
+ type: "uint256",
+ },
+ ],
+ name: "InvalidAccountNonce",
+ type: "error",
+ },
+ {
+ inputs: [],
+ name: "InvalidShortString",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "OwnableInvalidOwner",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "OwnableUnauthorizedAccount",
+ type: "error",
+ },
+ {
+ inputs: [
+ {
+ internalType: "string",
+ name: "str",
+ type: "string",
+ },
+ ],
+ name: "StringTooLong",
+ type: "error",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ indexed: true,
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "Approval",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [],
+ name: "EIP712DomainChanged",
+ 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: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "Paused",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "from",
+ type: "address",
+ },
+ {
+ indexed: true,
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "Transfer",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "Unpaused",
+ type: "event",
+ },
+ {
+ inputs: [],
+ name: "DOMAIN_SEPARATOR",
+ outputs: [
+ {
+ internalType: "bytes32",
+ name: "",
+ type: "bytes32",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ ],
+ name: "allowance",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "approve",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "balanceOf",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "burn",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "burnFrom",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "decimals",
+ outputs: [
+ {
+ internalType: "uint8",
+ name: "",
+ type: "uint8",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "eip712Domain",
+ outputs: [
+ {
+ internalType: "bytes1",
+ name: "fields",
+ type: "bytes1",
+ },
+ {
+ internalType: "string",
+ name: "name",
+ type: "string",
+ },
+ {
+ internalType: "string",
+ name: "version",
+ type: "string",
+ },
+ {
+ internalType: "uint256",
+ name: "chainId",
+ type: "uint256",
+ },
+ {
+ internalType: "address",
+ name: "verifyingContract",
+ type: "address",
+ },
+ {
+ internalType: "bytes32",
+ name: "salt",
+ type: "bytes32",
+ },
+ {
+ internalType: "uint256[]",
+ name: "extensions",
+ type: "uint256[]",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "flashFee",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "contract IERC3156FlashBorrower",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ {
+ internalType: "bytes",
+ name: "data",
+ type: "bytes",
+ },
+ ],
+ name: "flashLoan",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "token",
+ type: "address",
+ },
+ ],
+ name: "maxFlashLoan",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "amount",
+ type: "uint256",
+ },
+ ],
+ name: "mint",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "name",
+ outputs: [
+ {
+ internalType: "string",
+ name: "",
+ type: "string",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ ],
+ name: "nonces",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "owner",
+ outputs: [
+ {
+ internalType: "address",
+ name: "",
+ type: "address",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "pause",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "paused",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "owner",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "spender",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ {
+ internalType: "uint256",
+ name: "deadline",
+ type: "uint256",
+ },
+ {
+ internalType: "uint8",
+ name: "v",
+ type: "uint8",
+ },
+ {
+ internalType: "bytes32",
+ name: "r",
+ type: "bytes32",
+ },
+ {
+ internalType: "bytes32",
+ name: "s",
+ type: "bytes32",
+ },
+ ],
+ name: "permit",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "renounceOwnership",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "symbol",
+ outputs: [
+ {
+ internalType: "string",
+ name: "",
+ type: "string",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "totalSupply",
+ outputs: [
+ {
+ internalType: "uint256",
+ name: "",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "transfer",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "from",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "to",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "value",
+ type: "uint256",
+ },
+ ],
+ name: "transferFrom",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "newOwner",
+ type: "address",
+ },
+ ],
+ name: "transferOwnership",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "unpause",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
];
-// Moonbeam SLpX ABI Contract
+// Moonbeam SLpX ABI Contract
export const moonbeamSlpxAbi = [
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "previousAdmin",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "newAdmin",
- "type": "address"
- }
- ],
- "name": "AdminChanged",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "beacon",
- "type": "address"
- }
- ],
- "name": "BeaconUpgraded",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "implementation",
- "type": "address"
- }
- ],
- "name": "Upgraded",
- "type": "event"
- },
- {
- "stateMutability": "payable",
- "type": "fallback"
- },
- {
- "inputs": [],
- "name": "admin",
- "outputs": [
- {
- "internalType": "address",
- "name": "admin_",
- "type": "address"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newAdmin",
- "type": "address"
- }
- ],
- "name": "changeAdmin",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "implementation",
- "outputs": [
- {
- "internalType": "address",
- "name": "implementation_",
- "type": "address"
- }
- ],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newImplementation",
- "type": "address"
- }
- ],
- "name": "upgradeTo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newImplementation",
- "type": "address"
- },
- {
- "internalType": "bytes",
- "name": "data",
- "type": "bytes"
- }
- ],
- "name": "upgradeToAndCall",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "stateMutability": "payable",
- "type": "receive"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint128",
- "name": "amount",
- "type": "uint128"
- },
- {
- "indexed": false,
- "internalType": "uint64",
- "name": "dest_chain_id",
- "type": "uint64"
- },
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "receiver",
- "type": "bytes"
- },
- {
- "indexed": false,
- "internalType": "string",
- "name": "remark",
- "type": "string"
- },
- {
- "indexed": false,
- "internalType": "uint32",
- "name": "channel_id",
- "type": "uint32"
- }
- ],
- "name": "CreateOrder",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "uint8",
- "name": "version",
- "type": "uint8"
- }
- ],
- "name": "Initialized",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "minter",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "callcode",
- "type": "bytes"
- },
- {
- "indexed": false,
- "internalType": "string",
- "name": "remark",
- "type": "string"
- }
- ],
- "name": "Mint",
- "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": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "Paused",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "redeemer",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "bytes",
- "name": "callcode",
- "type": "bytes"
- }
- ],
- "name": "Redeem",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": false,
- "internalType": "address",
- "name": "account",
- "type": "address"
- }
- ],
- "name": "Unpaused",
- "type": "event"
- },
- {
- "inputs": [],
- "name": "BNCAddress",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "name": "addressToAssetInfo",
- "outputs": [
- {
- "internalType": "bytes2",
- "name": "currencyId",
- "type": "bytes2"
- },
- {
- "internalType": "uint256",
- "name": "operationalMin",
- "type": "uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "bifrostParaId",
- "outputs": [
- {
- "internalType": "uint32",
- "name": "",
- "type": "uint32"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "internalType": "uint128",
- "name": "amount",
- "type": "uint128"
- },
- {
- "internalType": "uint64",
- "name": "dest_chain_id",
- "type": "uint64"
- },
- {
- "internalType": "bytes",
- "name": "receiver",
- "type": "bytes"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- },
- {
- "internalType": "uint32",
- "name": "channel_id",
- "type": "uint32"
- }
- ],
- "name": "create_order",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint64",
- "name": "",
- "type": "uint64"
- }
- ],
- "name": "destChainInfo",
- "outputs": [
- {
- "internalType": "bool",
- "name": "is_evm",
- "type": "bool"
- },
- {
- "internalType": "bool",
- "name": "is_substrate",
- "type": "bool"
- },
- {
- "internalType": "bytes1",
- "name": "raw_chain_index",
- "type": "bytes1"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "_BNCAddress",
- "type": "address"
- },
- {
- "internalType": "uint32",
- "name": "_bifrostParaId",
- "type": "uint32"
- },
- {
- "internalType": "bytes2",
- "name": "_nativeCurrencyId",
- "type": "bytes2"
- }
- ],
- "name": "initialize",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- }
- ],
- "name": "mintVAsset",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- },
- {
- "internalType": "uint32",
- "name": "channel_id",
- "type": "uint32"
- }
- ],
- "name": "mintVAssetWithChannelId",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- }
- ],
- "name": "mintVNativeAsset",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- },
- {
- "internalType": "string",
- "name": "remark",
- "type": "string"
- },
- {
- "internalType": "uint32",
- "name": "channel_id",
- "type": "uint32"
- }
- ],
- "name": "mintVNativeAssetWithChannelId",
- "outputs": [],
- "stateMutability": "payable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "enum MoonbeamSlpx.Operation",
- "name": "",
- "type": "uint8"
- }
- ],
- "name": "operationToFeeInfo",
- "outputs": [
- {
- "internalType": "uint64",
- "name": "transactRequiredWeightAtMost",
- "type": "uint64"
- },
- {
- "internalType": "uint256",
- "name": "feeAmount",
- "type": "uint256"
- },
- {
- "internalType": "uint64",
- "name": "overallWeight",
- "type": "uint64"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "internalType": "address",
- "name": "",
- "type": "address"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "pause",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "paused",
- "outputs": [
- {
- "internalType": "bool",
- "name": "",
- "type": "bool"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "vAssetAddress",
- "type": "address"
- },
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- },
- {
- "internalType": "address",
- "name": "receiver",
- "type": "address"
- }
- ],
- "name": "redeemAsset",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "assetAddress",
- "type": "address"
- },
- {
- "internalType": "bytes2",
- "name": "currencyId",
- "type": "bytes2"
- },
- {
- "internalType": "uint256",
- "name": "minimumValue",
- "type": "uint256"
- }
- ],
- "name": "setAssetAddressInfo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "uint64",
- "name": "dest_chain_id",
- "type": "uint64"
- },
- {
- "internalType": "bool",
- "name": "is_evm",
- "type": "bool"
- },
- {
- "internalType": "bool",
- "name": "is_substrate",
- "type": "bool"
- },
- {
- "internalType": "bytes1",
- "name": "raw_chain_index",
- "type": "bytes1"
- }
- ],
- "name": "setDestChainInfo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "enum MoonbeamSlpx.Operation",
- "name": "_operation",
- "type": "uint8"
- },
- {
- "internalType": "uint64",
- "name": "_transactRequiredWeightAtMost",
- "type": "uint64"
- },
- {
- "internalType": "uint64",
- "name": "_overallWeight",
- "type": "uint64"
- },
- {
- "internalType": "uint256",
- "name": "_feeAmount",
- "type": "uint256"
- }
- ],
- "name": "setOperationToFeeInfo",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "unpause",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "_logic",
- "type": "address"
- },
- {
- "internalType": "address",
- "name": "admin_",
- "type": "address"
- },
- {
- "internalType": "bytes",
- "name": "_data",
- "type": "bytes"
- }
- ],
- "stateMutability": "payable",
- "type": "constructor"
- }
-];
\ No newline at end of file
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "previousAdmin",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "address",
+ name: "newAdmin",
+ type: "address",
+ },
+ ],
+ name: "AdminChanged",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "beacon",
+ type: "address",
+ },
+ ],
+ name: "BeaconUpgraded",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "implementation",
+ type: "address",
+ },
+ ],
+ name: "Upgraded",
+ type: "event",
+ },
+ {
+ stateMutability: "payable",
+ type: "fallback",
+ },
+ {
+ inputs: [],
+ name: "admin",
+ outputs: [
+ {
+ internalType: "address",
+ name: "admin_",
+ type: "address",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "newAdmin",
+ type: "address",
+ },
+ ],
+ name: "changeAdmin",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "implementation",
+ outputs: [
+ {
+ internalType: "address",
+ name: "implementation_",
+ type: "address",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "newImplementation",
+ type: "address",
+ },
+ ],
+ name: "upgradeTo",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "newImplementation",
+ type: "address",
+ },
+ {
+ internalType: "bytes",
+ name: "data",
+ type: "bytes",
+ },
+ ],
+ name: "upgradeToAndCall",
+ outputs: [],
+ stateMutability: "payable",
+ type: "function",
+ },
+ {
+ stateMutability: "payable",
+ type: "receive",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "assetAddress",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint128",
+ name: "amount",
+ type: "uint128",
+ },
+ {
+ indexed: false,
+ internalType: "uint64",
+ name: "dest_chain_id",
+ type: "uint64",
+ },
+ {
+ indexed: false,
+ internalType: "bytes",
+ name: "receiver",
+ type: "bytes",
+ },
+ {
+ indexed: false,
+ internalType: "string",
+ name: "remark",
+ type: "string",
+ },
+ {
+ indexed: false,
+ internalType: "uint32",
+ name: "channel_id",
+ type: "uint32",
+ },
+ ],
+ name: "CreateOrder",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "uint8",
+ name: "version",
+ type: "uint8",
+ },
+ ],
+ name: "Initialized",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "minter",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "address",
+ name: "assetAddress",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint256",
+ name: "amount",
+ type: "uint256",
+ },
+ {
+ indexed: false,
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "bytes",
+ name: "callcode",
+ type: "bytes",
+ },
+ {
+ indexed: false,
+ internalType: "string",
+ name: "remark",
+ type: "string",
+ },
+ ],
+ name: "Mint",
+ 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: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "Paused",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "redeemer",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "address",
+ name: "assetAddress",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "uint256",
+ name: "amount",
+ type: "uint256",
+ },
+ {
+ indexed: false,
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ indexed: false,
+ internalType: "bytes",
+ name: "callcode",
+ type: "bytes",
+ },
+ ],
+ name: "Redeem",
+ type: "event",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ internalType: "address",
+ name: "account",
+ type: "address",
+ },
+ ],
+ name: "Unpaused",
+ type: "event",
+ },
+ {
+ inputs: [],
+ name: "BNCAddress",
+ outputs: [
+ {
+ internalType: "address",
+ name: "",
+ type: "address",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "",
+ type: "address",
+ },
+ ],
+ name: "addressToAssetInfo",
+ outputs: [
+ {
+ internalType: "bytes2",
+ name: "currencyId",
+ type: "bytes2",
+ },
+ {
+ internalType: "uint256",
+ name: "operationalMin",
+ type: "uint256",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "bifrostParaId",
+ outputs: [
+ {
+ internalType: "uint32",
+ name: "",
+ type: "uint32",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "assetAddress",
+ type: "address",
+ },
+ {
+ internalType: "uint128",
+ name: "amount",
+ type: "uint128",
+ },
+ {
+ internalType: "uint64",
+ name: "dest_chain_id",
+ type: "uint64",
+ },
+ {
+ internalType: "bytes",
+ name: "receiver",
+ type: "bytes",
+ },
+ {
+ internalType: "string",
+ name: "remark",
+ type: "string",
+ },
+ {
+ internalType: "uint32",
+ name: "channel_id",
+ type: "uint32",
+ },
+ ],
+ name: "create_order",
+ outputs: [],
+ stateMutability: "payable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint64",
+ name: "",
+ type: "uint64",
+ },
+ ],
+ name: "destChainInfo",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "is_evm",
+ type: "bool",
+ },
+ {
+ internalType: "bool",
+ name: "is_substrate",
+ type: "bool",
+ },
+ {
+ internalType: "bytes1",
+ name: "raw_chain_index",
+ type: "bytes1",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "_BNCAddress",
+ type: "address",
+ },
+ {
+ internalType: "uint32",
+ name: "_bifrostParaId",
+ type: "uint32",
+ },
+ {
+ internalType: "bytes2",
+ name: "_nativeCurrencyId",
+ type: "bytes2",
+ },
+ ],
+ name: "initialize",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "assetAddress",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "amount",
+ type: "uint256",
+ },
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ internalType: "string",
+ name: "remark",
+ type: "string",
+ },
+ ],
+ name: "mintVAsset",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "assetAddress",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "amount",
+ type: "uint256",
+ },
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ internalType: "string",
+ name: "remark",
+ type: "string",
+ },
+ {
+ internalType: "uint32",
+ name: "channel_id",
+ type: "uint32",
+ },
+ ],
+ name: "mintVAssetWithChannelId",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ internalType: "string",
+ name: "remark",
+ type: "string",
+ },
+ ],
+ name: "mintVNativeAsset",
+ outputs: [],
+ stateMutability: "payable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ {
+ internalType: "string",
+ name: "remark",
+ type: "string",
+ },
+ {
+ internalType: "uint32",
+ name: "channel_id",
+ type: "uint32",
+ },
+ ],
+ name: "mintVNativeAssetWithChannelId",
+ outputs: [],
+ stateMutability: "payable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "enum MoonbeamSlpx.Operation",
+ name: "",
+ type: "uint8",
+ },
+ ],
+ name: "operationToFeeInfo",
+ outputs: [
+ {
+ internalType: "uint64",
+ name: "transactRequiredWeightAtMost",
+ type: "uint64",
+ },
+ {
+ internalType: "uint256",
+ name: "feeAmount",
+ type: "uint256",
+ },
+ {
+ internalType: "uint64",
+ name: "overallWeight",
+ type: "uint64",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "owner",
+ outputs: [
+ {
+ internalType: "address",
+ name: "",
+ type: "address",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "pause",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "paused",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "vAssetAddress",
+ type: "address",
+ },
+ {
+ internalType: "uint256",
+ name: "amount",
+ type: "uint256",
+ },
+ {
+ internalType: "address",
+ name: "receiver",
+ type: "address",
+ },
+ ],
+ name: "redeemAsset",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "renounceOwnership",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "assetAddress",
+ type: "address",
+ },
+ {
+ internalType: "bytes2",
+ name: "currencyId",
+ type: "bytes2",
+ },
+ {
+ internalType: "uint256",
+ name: "minimumValue",
+ type: "uint256",
+ },
+ ],
+ name: "setAssetAddressInfo",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "uint64",
+ name: "dest_chain_id",
+ type: "uint64",
+ },
+ {
+ internalType: "bool",
+ name: "is_evm",
+ type: "bool",
+ },
+ {
+ internalType: "bool",
+ name: "is_substrate",
+ type: "bool",
+ },
+ {
+ internalType: "bytes1",
+ name: "raw_chain_index",
+ type: "bytes1",
+ },
+ ],
+ name: "setDestChainInfo",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "enum MoonbeamSlpx.Operation",
+ name: "_operation",
+ type: "uint8",
+ },
+ {
+ internalType: "uint64",
+ name: "_transactRequiredWeightAtMost",
+ type: "uint64",
+ },
+ {
+ internalType: "uint64",
+ name: "_overallWeight",
+ type: "uint64",
+ },
+ {
+ internalType: "uint256",
+ name: "_feeAmount",
+ type: "uint256",
+ },
+ ],
+ name: "setOperationToFeeInfo",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "newOwner",
+ type: "address",
+ },
+ ],
+ name: "transferOwnership",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "unpause",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "_logic",
+ type: "address",
+ },
+ {
+ internalType: "address",
+ name: "admin_",
+ type: "address",
+ },
+ {
+ internalType: "bytes",
+ name: "_data",
+ type: "bytes",
+ },
+ ],
+ stateMutability: "payable",
+ type: "constructor",
+ },
+];
+
+// TokenVesting contract ABI
+export const tokenVestingAbi = [
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "beneficiary",
+ type: "address",
+ },
+ ],
+ name: "addToWhitelist",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "beneficiary",
+ type: "address",
+ },
+ ],
+ name: "BeneficiaryWhitelisted",
+ type: "event",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "beneficiary",
+ type: "address",
+ },
+ ],
+ name: "removeFromWhitelist",
+ outputs: [],
+ stateMutability: "nonpayable",
+ type: "function",
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ internalType: "address",
+ name: "beneficiary",
+ type: "address",
+ },
+ ],
+ name: "BeneficiaryRemovedFromWhitelist",
+ type: "event",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "",
+ type: "address",
+ },
+ ],
+ name: "whitelist",
+ outputs: [
+ {
+ internalType: "bool",
+ name: "",
+ type: "bool",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [],
+ name: "owner",
+ outputs: [
+ {
+ internalType: "address",
+ name: "",
+ type: "address",
+ },
+ ],
+ stateMutability: "view",
+ type: "function",
+ },
+ {
+ inputs: [
+ {
+ internalType: "address",
+ name: "tokenAddress",
+ type: "address",
+ },
+ ],
+ stateMutability: "nonpayable",
+ type: "constructor",
+ },
+];