diff --git a/apps/dapp/abi/contracts/templegold/AuctionBase.sol/AuctionBase.json b/apps/dapp/abi/contracts/templegold/AuctionBase.sol/AuctionBase.json
new file mode 100644
index 000000000..dd91698c2
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/AuctionBase.sol/AuctionBase.json
@@ -0,0 +1,343 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "AuctionBase",
+ "sourceName": "contracts/templegold/AuctionBase.sol",
+ "abi": [
+ {
+ "inputs": [],
+ "name": "AlreadyClaimed",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AlreadyRecovered",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AuctionActive",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AuctionEnded",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "CannotClaim",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotDeposit",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotStartAuction",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidEpoch",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidOperation",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "startTime",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "endTime",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "AuctionStarted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "bidTokenAmount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Claim",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Deposit",
+ "type": "event"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "bid",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claimed",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "claimed",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claimedAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "claimedAmount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "currentEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "depositors",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "epochsWithoutBidsRecovered",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "recovered",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getEpochInfo",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "startTime",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint128",
+ "name": "endTime",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint256",
+ "name": "totalBidTokenAmount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "totalAuctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct IAuctionBase.EpochInfo",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "recoverToken",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "startAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+ ],
+ "bytecode": "0x",
+ "deployedBytecode": "0x",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/DaiGoldAuction.sol/DaiGoldAuction.json b/apps/dapp/abi/contracts/templegold/DaiGoldAuction.sol/DaiGoldAuction.json
new file mode 100644
index 000000000..50ca814a6
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/DaiGoldAuction.sol/DaiGoldAuction.json
@@ -0,0 +1,1174 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "DaiGoldAuction",
+ "sourceName": "contracts/templegold/DaiGoldAuction.sol",
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_templeGold",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_bidToken",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_treasury",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_rescuer",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_auctionStarter",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "target",
+ "type": "address"
+ }
+ ],
+ "name": "AddressEmptyCode",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "AddressInsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AlreadyClaimed",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AlreadyRecovered",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AuctionActive",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AuctionEnded",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "CannotClaim",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotDeposit",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotStartAuction",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ExpectedNonZero",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "FailedInnerCall",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAccess",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAddress",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "InvalidAmount",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidEpoch",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidOperation",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochGoldAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "LowGoldDistributed",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "x",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "y",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "denominator",
+ "type": "uint256"
+ }
+ ],
+ "name": "PRBMath_MulDiv_Overflow",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "SafeERC20FailedOperation",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "auctionsTimeDiff",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "auctionStartCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint192",
+ "name": "auctionMinimumDistributedGold",
+ "type": "uint192"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct IDaiGoldAuction.AuctionConfig",
+ "name": "config",
+ "type": "tuple"
+ }
+ ],
+ "name": "AuctionConfigSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "startTime",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "endTime",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "AuctionStarted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ }
+ ],
+ "name": "AuctionStarterSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "bidToken",
+ "type": "address"
+ }
+ ],
+ "name": "BidTokenSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "bidTokenAmount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Claim",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Deposit",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "ExplicitAccessSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "timestamp",
+ "type": "uint256"
+ }
+ ],
+ "name": "GoldDistributionNotified",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "RescueModeSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenRecovered",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "AUCTION_DURATION",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "",
+ "type": "uint64"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "auctionStarter",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "bid",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "bidToken",
+ "outputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "canDeposit",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claim",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claimed",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "claimed",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claimedAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "claimedAmount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "currentEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "depositors",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "distributeGold",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "epochGoldSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "epochsWithoutBidsRecovered",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "recovered",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "executor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "name": "explicitFunctionAccess",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getAuctionConfig",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "auctionsTimeDiff",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "auctionStartCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint192",
+ "name": "auctionMinimumDistributedGold",
+ "type": "uint192"
+ }
+ ],
+ "internalType": "struct IDaiGoldAuction.AuctionConfig",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ }
+ ],
+ "name": "getClaimableAtCurrentEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getClaimableAtEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getEpochInfo",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "startTime",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint128",
+ "name": "endTime",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint256",
+ "name": "totalBidTokenAmount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "totalAuctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct IAuctionBase.EpochInfo",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "inRescueMode",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "isCurrentEpochEnded",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "nextAuctionGoldAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "nextEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "notifyDistribution",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ }
+ ],
+ "name": "recoverTempleGoldForZeroBidAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "recoverToken",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rescuer",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "auctionsTimeDiff",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "auctionStartCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint192",
+ "name": "auctionMinimumDistributedGold",
+ "type": "uint192"
+ }
+ ],
+ "internalType": "struct IDaiGoldAuction.AuctionConfig",
+ "name": "_config",
+ "type": "tuple"
+ }
+ ],
+ "name": "setAuctionConfig",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_starter",
+ "type": "address"
+ }
+ ],
+ "name": "setAuctionStarter",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_bidToken",
+ "type": "address"
+ }
+ ],
+ "name": "setBidToken",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "allowedCaller",
+ "type": "address"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowed",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct ITempleElevatedAccess.ExplicitAccess[]",
+ "name": "access",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setExplicitAccess",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "setRescueMode",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "startAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "templeGold",
+ "outputs": [
+ {
+ "internalType": "contract ITempleGold",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "treasury",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+ ],
+ "bytecode": "0x60c06040523480156200001157600080fd5b50604051620031ea380380620031ea833981016040819052620000349162000161565b82826001600160a01b0382166200005e5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038116620000865760405163e6c4247b60e01b815260040160405180910390fd5b816001600160a01b0316816001600160a01b031603620000b95760405163e6c4247b60e01b815260040160405180910390fd5b600680546001600160a01b03199081166001600160a01b039485161790915560078054821692841692909217909155878216608052600b8054821688841617905585821660a052600c805490911691831691821790556040517f9912e2a4535169ea3ec6c9138afab89a1ba028d9534726bbedd154a25f11392c90600090a2505050505050620001e2565b80516001600160a01b03811681146200015c57600080fd5b919050565b60008060008060008060c087890312156200017b57600080fd5b620001868762000144565b9550620001966020880162000144565b9450620001a66040880162000144565b9350620001b66060880162000144565b9250620001c66080880162000144565b9150620001d660a0880162000144565b90509295509295509295565b60805160a051612faa620002406000396000818161058c0152610fbb0152600081816107a401528181610e890152818161122d0152818161184401528181611b14015281816123a20152818161241901526126810152612faa6000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c8063766718081161017b578063ccb51004116100d8578063e110dfda1161008c578063e78a587511610071578063e78a5875146107d9578063f0234008146107e1578063f3ed8f251461080457600080fd5b8063e110dfda1461079f578063e36977cc146107c657600080fd5b8063d9a349c1116100bd578063d9a349c11461073e578063daeccc7914610751578063dfafd4fd1461077f57600080fd5b8063ccb5100414610723578063d2fbb3cb1461072b57600080fd5b8063ab1b71bd1161012f578063b3ba0e2b11610114578063b3ba0e2b146106e7578063bfccf0ec146106f0578063c34c08e51461070357600080fd5b8063ab1b71bd146106cc578063aea0e78b146106df57600080fd5b80638503ae3d116101605780638503ae3d146105d9578063a271e52514610696578063a7229fd9146106b957600080fd5b806376671808146105c95780638112c4af146105d157600080fd5b806338a6318311610229578063501ee126116101dd57806361d027b3116101c257806361d027b314610587578063654f2fc8146105ae5780636b64c769146105c157600080fd5b8063501ee1261461054957806355b4b1a41461055c57600080fd5b8063454a2ab31161020e578063454a2ab3146104dd578063466c01b8146104f05780634dd6c8de1461051b57600080fd5b806338a631831461047b578063396939f21461049b57600080fd5b806314e21ecf116102805780631a7d73d0116102655780631a7d73d01461041b5780631f21140514610460578063379607f51461046857600080fd5b806314e21ecf146103dd5780631810fe7f146103fe57600080fd5b8063032ef901146102b257806307f184f1146102c7578063128e771b146102da578063135022c2146102ed575b600080fd5b6102c56102c0366004612a13565b610827565b005b6102c56102d5366004612a59565b6108d6565b6102c56102e8366004612a59565b610a0e565b6103866102fb366004612a74565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260016020818152604092839020835160808101855281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041692810192909252918201549281019290925260020154606082015290565b6040516103d4919060006080820190506fffffffffffffffffffffffffffffffff80845116835280602085015116602084015250604083015160408301526060830151606083015292915050565b60405180910390f35b6103f06103eb366004612a59565b610b66565b6040519081526020016103d4565b60095461040b9060ff1681565b60405190151581526020016103d4565b600c5461043b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103d4565b6102c5610b7a565b6102c5610476366004612a74565b610c99565b60065461043b9073ffffffffffffffffffffffffffffffffffffffff1681565b61040b60008054815260016020526040812054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115905090565b6102c56104eb366004612a74565b610f13565b6103f06104fe366004612a8d565b600260209081526000928352604080842090915290825290205481565b61040b610529366004612a8d565b600360209081526000928352604080842090915290825290205460ff1681565b6102c5610557366004612a59565b61107a565b6103f061056a366004612a8d565b600460209081526000928352604080842090915290825290205481565b61043b7f000000000000000000000000000000000000000000000000000000000000000081565b6102c56105bc366004612a74565b611215565b6102c5611309565b6000546103f0565b6102c5611617565b61064f60408051606081018252600080825260208201819052918101919091525060408051606081018252600e5463ffffffff8082168352640100000000820416602083015268010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff169181019190915290565b60408051825163ffffffff9081168252602080850151909116908201529181015177ffffffffffffffffffffffffffffffffffffffffffffffff16908201526060016103d4565b6106a062093a8081565b60405167ffffffffffffffff90911681526020016103d4565b6102c56106c7366004612ab7565b611757565b6103f06106da366004612a8d565b611b43565b6103f0611c4e565b6103f0600d5481565b6102c56106fe366004612af3565b611c5d565b60075461043b9073ffffffffffffffffffffffffffffffffffffffff1681565b6102c5611e5c565b6102c5610739366004612b79565b611e66565b6102c561074c366004612a59565b612024565b61040b61075f366004612bc1565b600860209081526000928352604080842090915290825290205460ff1681565b600b5461043b9073ffffffffffffffffffffffffffffffffffffffff1681565b61043b7f000000000000000000000000000000000000000000000000000000000000000081565b6102c56107d4366004612bf4565b612169565b61040b612446565b6103f06107ef366004612a74565b60009081526001602052604090206002015490565b61040b610812366004612a74565b60056020526000908152604090205460ff1681565b60065473ffffffffffffffffffffffffffffffffffffffff163314610878576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60065473ffffffffffffffffffffffffffffffffffffffff163314610927576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610974576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46009805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b610a3c336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b610a72576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831617905560008054815260016020526040902054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115610b22576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f9912e2a4535169ea3ec6c9138afab89a1ba028d9534726bbedd154a25f11392c90600090a250565b6000610b7482600054611b43565b92915050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610bcb576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065473ffffffffffffffffffffffffffffffffffffffff163303610c1c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600754604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600780547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600a80549091169055565b60008181526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115610d11576040517fbf009dab000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b80546fffffffffffffffffffffffffffffffff16600003610d5e576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260036020908152604080832085845290915290205460ff1615610db3576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260026020908152604080832085845290915281205490819003610e08576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600360209081526040808320868452909152812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155600284015490840154610e6391849184612521565b3360008181526004602090815260408083208984529091529020829055909150610ec5907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169083612568565b604080518581526020810184905290810182905233907f45c072aa05b9853b5a993de7a28bc332ee01404a628cec1a23ce0f659f842ef19060600160405180910390a250505050565b905090565b600080548152600160205260409020610f2b906125e9565b610f61576040517f65ca8f5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610f9b576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b54610fe09073ffffffffffffffffffffffffffffffffffffffff16337f000000000000000000000000000000000000000000000000000000000000000084612639565b60008054338252600260209081526040808420838552909152822080549192849261100c908490612c46565b909155505060008181526001602081905260408220908101805491928592611035908490612c46565b9091555050604080518381526020810185905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a2505050565b6110a8336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b6110de576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661112b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054815260016020526040902054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff16111561119b576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f24e72a08217d19828f258be09f53f19295e0b24dbd7d8f168403e54e88af5bc9906020015b60405180910390a150565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015906112865750611284336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b155b156112bd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600d60008282546112cf9190612c46565b9091555050604080518281524260208201527f1e215fdd40f0b4854c5a2b2cfe53859ca232f085a5b129c9f65b6bfeb094c5e4910161120a565b600c5473ffffffffffffffffffffffffffffffffffffffff16158015906113485750600c5473ffffffffffffffffffffffffffffffffffffffff163314155b1561137f576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054808252600160205260409091208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611156113f2576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8215801590611450575080548254429161143c9163ffffffff9091169070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612c59565b6fffffffffffffffffffffffffffffffff16115b15611487576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61148f61267f565b600d8054600091829055906114a5856001612c46565b6000819055835490915068010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff16821015611511576040517fd1c6fee000000000000000000000000000000000000000000000000000000000815260048101839052602401610d08565b600081815260016020526040812060028101849055845490919061154390640100000000900463ffffffff1642612c59565b82547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161783559050600061158e62093a8083612c59565b83546fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000008383169081029190911786556040805188815292861660208401528201526060810187905290915033907f2f0e07e2baf6351377b2a46b5ccf5cd22b494921f870da223157659e174918f99060800160405180910390a25050505050505050565b600954610100900473ffffffffffffffffffffffffffffffffffffffff16331461166d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075473ffffffffffffffffffffffffffffffffffffffff1633036116be576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600654604051339173ffffffffffffffffffffffffffffffffffffffff16907ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e090600090a3600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600980547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b611785336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b6117bb576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611808576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003611842576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611922578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f9096836040516118f491815260200190565b60405180910390a361191d73ffffffffffffffffffffffffffffffffffffffff84168383612568565b505050565b600080548082526001602052604082208054919290916fffffffffffffffffffffffffffffffff169003611982576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61198b816125e9565b156119c2576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611611a23576040517fa0e9298400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600281015480841115611a81576040517fb2b3b53b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716600482015260248101859052604401610d08565b6000838152600160208181526040808420848155928301849055600290920192909255600d80548785030190555185815273ffffffffffffffffffffffffffffffffffffffff88811692908816917f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f9096910160405180910390a3611b3b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168686612568565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020908152604080832084845290915281205460ff1615611b8457506000610b74565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600260209081526040808320858452909152902054801580611bc3575060005483115b15611bd2576000915050610b74565b6000838152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff8082168352700100000000000000000000000000000000909104169381019390935292830154908201819052600290920154606082018190529092611c4592859291612521565b95945050505050565b60008054610f0e906001612c46565b611c8b336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b611cc1576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611d0e576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b82811015611b3b57848482818110611d4157611d41612c89565b905060400201803603810190611d579190612cb8565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260088352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055611e5581612d3c565b9050611d27565b611e6461267f565b565b611e94336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b611eca576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611eda6040820160208301612d86565b63ffffffff161580611f135750611ef76060820160408301612dc9565b77ffffffffffffffffffffffffffffffffffffffffffffffff16155b80611f2e5750611f266020820182612d86565b63ffffffff16155b15611f65576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080548082526001602052604090912054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115611fd7576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600e611fe48282612de6565b9050507f0ae1772a552aa48ab7e8bf58c335b3d4ce981b3d6c928f90d69a58f0f28d75fe8183604051612018929190612e8c565b60405180910390a15050565b612052336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b612088576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166120d5576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5460075460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b612197336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b6121cd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661221a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054821115612256576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604090205460ff161561229f576040517f3e49310000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff16111561230f576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018101541561234b576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556002820154905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811691908516907f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f9096906123f79085815260200190565b60405180910390a361244073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168483612568565b50505050565b600080548152600160205260408120610f0e906125e9565b60095460009060ff1615612490575060065473ffffffffffffffffffffffffffffffffffffffff838116911614610b74565b60075473ffffffffffffffffffffffffffffffffffffffff8481169116148061250b575073ffffffffffffffffffffffffffffffffffffffff831660009081526008602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b1561251857506001610b74565b50600092915050565b600061252e8585856126fb565b905081801561254d57506000838061254857612548612ef9565b858709115b156125605761255d600182612c46565b90505b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261191d91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061280c565b8054600090426fffffffffffffffffffffffffffffffff90911611801590610b745750505470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16421090565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526124409186918216906323b872dd906084016125a2565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631249c58b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156126e757600080fd5b505af1158015612440573d6000803e3d6000fd5b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036127535783828161274957612749612ef9565b0492505050612805565b83811061279d576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401610d08565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b600061282e73ffffffffffffffffffffffffffffffffffffffff8416836128a2565b905080516000141580156128535750808060200190518101906128519190612f28565b155b1561191d576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610d08565b606061280583836000846000808573ffffffffffffffffffffffffffffffffffffffff1684866040516128d59190612f45565b60006040518083038185875af1925050503d8060008114612912576040519150601f19603f3d011682016040523d82523d6000602084013e612917565b606091505b5091509150612927868383612931565b9695505050505050565b60608261294657612941826129c0565b612805565b815115801561296a575073ffffffffffffffffffffffffffffffffffffffff84163b155b156129b9576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d08565b5080612805565b8051156129d05780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b8015158114612a0257600080fd5b600060208284031215612a2557600080fd5b813561280581612a05565b803573ffffffffffffffffffffffffffffffffffffffff81168114612a5457600080fd5b919050565b600060208284031215612a6b57600080fd5b61280582612a30565b600060208284031215612a8657600080fd5b5035919050565b60008060408385031215612aa057600080fd5b612aa983612a30565b946020939093013593505050565b600080600060608486031215612acc57600080fd5b612ad584612a30565b9250612ae360208501612a30565b9150604084013590509250925092565b600080600060408486031215612b0857600080fd5b612b1184612a30565b9250602084013567ffffffffffffffff80821115612b2e57600080fd5b818601915086601f830112612b4257600080fd5b813581811115612b5157600080fd5b8760208260061b8501011115612b6657600080fd5b6020830194508093505050509250925092565b600060608284031215612b8b57600080fd5b50919050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114612a5457600080fd5b60008060408385031215612bd457600080fd5b612bdd83612a30565b9150612beb60208401612b91565b90509250929050565b60008060408385031215612c0757600080fd5b82359150612beb60208401612a30565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610b7457610b74612c17565b6fffffffffffffffffffffffffffffffff818116838216019080821115612c8257612c82612c17565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060408284031215612cca57600080fd5b6040516040810181811067ffffffffffffffff82111715612d14577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052612d2083612b91565b81526020830135612d3081612a05565b60208201529392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d6d57612d6d612c17565b5060010190565b63ffffffff81168114612a0257600080fd5b600060208284031215612d9857600080fd5b813561280581612d74565b77ffffffffffffffffffffffffffffffffffffffffffffffff81168114612a0257600080fd5b600060208284031215612ddb57600080fd5b813561280581612da3565b8135612df181612d74565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135612e3181612d74565b67ffffffff000000008160201b1690507fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000081848285161717855560408601359250612e7b83612da3565b921760409190911b90911617905550565b828152608081018235612e9e81612d74565b63ffffffff808216602085015260208501359150612ebb82612d74565b16604083810191909152830135612ed181612da3565b77ffffffffffffffffffffffffffffffffffffffffffffffff81166060840152509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600060208284031215612f3a57600080fd5b815161280581612a05565b6000825160005b81811015612f665760208186018101518583015201612f4c565b50600092019182525091905056fea2646970667358221220cfdaff998e353abb9c668f7edd4d4ce42c4258910eb90aa3e080ab341e9afa9f64736f6c63430008140033",
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c8063766718081161017b578063ccb51004116100d8578063e110dfda1161008c578063e78a587511610071578063e78a5875146107d9578063f0234008146107e1578063f3ed8f251461080457600080fd5b8063e110dfda1461079f578063e36977cc146107c657600080fd5b8063d9a349c1116100bd578063d9a349c11461073e578063daeccc7914610751578063dfafd4fd1461077f57600080fd5b8063ccb5100414610723578063d2fbb3cb1461072b57600080fd5b8063ab1b71bd1161012f578063b3ba0e2b11610114578063b3ba0e2b146106e7578063bfccf0ec146106f0578063c34c08e51461070357600080fd5b8063ab1b71bd146106cc578063aea0e78b146106df57600080fd5b80638503ae3d116101605780638503ae3d146105d9578063a271e52514610696578063a7229fd9146106b957600080fd5b806376671808146105c95780638112c4af146105d157600080fd5b806338a6318311610229578063501ee126116101dd57806361d027b3116101c257806361d027b314610587578063654f2fc8146105ae5780636b64c769146105c157600080fd5b8063501ee1261461054957806355b4b1a41461055c57600080fd5b8063454a2ab31161020e578063454a2ab3146104dd578063466c01b8146104f05780634dd6c8de1461051b57600080fd5b806338a631831461047b578063396939f21461049b57600080fd5b806314e21ecf116102805780631a7d73d0116102655780631a7d73d01461041b5780631f21140514610460578063379607f51461046857600080fd5b806314e21ecf146103dd5780631810fe7f146103fe57600080fd5b8063032ef901146102b257806307f184f1146102c7578063128e771b146102da578063135022c2146102ed575b600080fd5b6102c56102c0366004612a13565b610827565b005b6102c56102d5366004612a59565b6108d6565b6102c56102e8366004612a59565b610a0e565b6103866102fb366004612a74565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260016020818152604092839020835160808101855281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041692810192909252918201549281019290925260020154606082015290565b6040516103d4919060006080820190506fffffffffffffffffffffffffffffffff80845116835280602085015116602084015250604083015160408301526060830151606083015292915050565b60405180910390f35b6103f06103eb366004612a59565b610b66565b6040519081526020016103d4565b60095461040b9060ff1681565b60405190151581526020016103d4565b600c5461043b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103d4565b6102c5610b7a565b6102c5610476366004612a74565b610c99565b60065461043b9073ffffffffffffffffffffffffffffffffffffffff1681565b61040b60008054815260016020526040812054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115905090565b6102c56104eb366004612a74565b610f13565b6103f06104fe366004612a8d565b600260209081526000928352604080842090915290825290205481565b61040b610529366004612a8d565b600360209081526000928352604080842090915290825290205460ff1681565b6102c5610557366004612a59565b61107a565b6103f061056a366004612a8d565b600460209081526000928352604080842090915290825290205481565b61043b7f000000000000000000000000000000000000000000000000000000000000000081565b6102c56105bc366004612a74565b611215565b6102c5611309565b6000546103f0565b6102c5611617565b61064f60408051606081018252600080825260208201819052918101919091525060408051606081018252600e5463ffffffff8082168352640100000000820416602083015268010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff169181019190915290565b60408051825163ffffffff9081168252602080850151909116908201529181015177ffffffffffffffffffffffffffffffffffffffffffffffff16908201526060016103d4565b6106a062093a8081565b60405167ffffffffffffffff90911681526020016103d4565b6102c56106c7366004612ab7565b611757565b6103f06106da366004612a8d565b611b43565b6103f0611c4e565b6103f0600d5481565b6102c56106fe366004612af3565b611c5d565b60075461043b9073ffffffffffffffffffffffffffffffffffffffff1681565b6102c5611e5c565b6102c5610739366004612b79565b611e66565b6102c561074c366004612a59565b612024565b61040b61075f366004612bc1565b600860209081526000928352604080842090915290825290205460ff1681565b600b5461043b9073ffffffffffffffffffffffffffffffffffffffff1681565b61043b7f000000000000000000000000000000000000000000000000000000000000000081565b6102c56107d4366004612bf4565b612169565b61040b612446565b6103f06107ef366004612a74565b60009081526001602052604090206002015490565b61040b610812366004612a74565b60056020526000908152604090205460ff1681565b60065473ffffffffffffffffffffffffffffffffffffffff163314610878576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60065473ffffffffffffffffffffffffffffffffffffffff163314610927576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610974576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46009805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b610a3c336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b610a72576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831617905560008054815260016020526040902054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115610b22576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f9912e2a4535169ea3ec6c9138afab89a1ba028d9534726bbedd154a25f11392c90600090a250565b6000610b7482600054611b43565b92915050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610bcb576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065473ffffffffffffffffffffffffffffffffffffffff163303610c1c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600754604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600780547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600a80549091169055565b60008181526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115610d11576040517fbf009dab000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b80546fffffffffffffffffffffffffffffffff16600003610d5e576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260036020908152604080832085845290915290205460ff1615610db3576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260026020908152604080832085845290915281205490819003610e08576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600360209081526040808320868452909152812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155600284015490840154610e6391849184612521565b3360008181526004602090815260408083208984529091529020829055909150610ec5907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169083612568565b604080518581526020810184905290810182905233907f45c072aa05b9853b5a993de7a28bc332ee01404a628cec1a23ce0f659f842ef19060600160405180910390a250505050565b905090565b600080548152600160205260409020610f2b906125e9565b610f61576040517f65ca8f5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610f9b576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b54610fe09073ffffffffffffffffffffffffffffffffffffffff16337f000000000000000000000000000000000000000000000000000000000000000084612639565b60008054338252600260209081526040808420838552909152822080549192849261100c908490612c46565b909155505060008181526001602081905260408220908101805491928592611035908490612c46565b9091555050604080518381526020810185905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a2505050565b6110a8336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b6110de576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661112b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054815260016020526040902054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff16111561119b576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f24e72a08217d19828f258be09f53f19295e0b24dbd7d8f168403e54e88af5bc9906020015b60405180910390a150565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015906112865750611284336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b155b156112bd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600d60008282546112cf9190612c46565b9091555050604080518281524260208201527f1e215fdd40f0b4854c5a2b2cfe53859ca232f085a5b129c9f65b6bfeb094c5e4910161120a565b600c5473ffffffffffffffffffffffffffffffffffffffff16158015906113485750600c5473ffffffffffffffffffffffffffffffffffffffff163314155b1561137f576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054808252600160205260409091208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611156113f2576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8215801590611450575080548254429161143c9163ffffffff9091169070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612c59565b6fffffffffffffffffffffffffffffffff16115b15611487576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61148f61267f565b600d8054600091829055906114a5856001612c46565b6000819055835490915068010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff16821015611511576040517fd1c6fee000000000000000000000000000000000000000000000000000000000815260048101839052602401610d08565b600081815260016020526040812060028101849055845490919061154390640100000000900463ffffffff1642612c59565b82547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161783559050600061158e62093a8083612c59565b83546fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000008383169081029190911786556040805188815292861660208401528201526060810187905290915033907f2f0e07e2baf6351377b2a46b5ccf5cd22b494921f870da223157659e174918f99060800160405180910390a25050505050505050565b600954610100900473ffffffffffffffffffffffffffffffffffffffff16331461166d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075473ffffffffffffffffffffffffffffffffffffffff1633036116be576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600654604051339173ffffffffffffffffffffffffffffffffffffffff16907ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e090600090a3600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600980547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b611785336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b6117bb576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611808576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003611842576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611922578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f9096836040516118f491815260200190565b60405180910390a361191d73ffffffffffffffffffffffffffffffffffffffff84168383612568565b505050565b600080548082526001602052604082208054919290916fffffffffffffffffffffffffffffffff169003611982576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61198b816125e9565b156119c2576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611611a23576040517fa0e9298400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600281015480841115611a81576040517fb2b3b53b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716600482015260248101859052604401610d08565b6000838152600160208181526040808420848155928301849055600290920192909255600d80548785030190555185815273ffffffffffffffffffffffffffffffffffffffff88811692908816917f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f9096910160405180910390a3611b3b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168686612568565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020908152604080832084845290915281205460ff1615611b8457506000610b74565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600260209081526040808320858452909152902054801580611bc3575060005483115b15611bd2576000915050610b74565b6000838152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff8082168352700100000000000000000000000000000000909104169381019390935292830154908201819052600290920154606082018190529092611c4592859291612521565b95945050505050565b60008054610f0e906001612c46565b611c8b336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b611cc1576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611d0e576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b82811015611b3b57848482818110611d4157611d41612c89565b905060400201803603810190611d579190612cb8565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260088352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055611e5581612d3c565b9050611d27565b611e6461267f565b565b611e94336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b611eca576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611eda6040820160208301612d86565b63ffffffff161580611f135750611ef76060820160408301612dc9565b77ffffffffffffffffffffffffffffffffffffffffffffffff16155b80611f2e5750611f266020820182612d86565b63ffffffff16155b15611f65576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080548082526001602052604090912054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115611fd7576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600e611fe48282612de6565b9050507f0ae1772a552aa48ab7e8bf58c335b3d4ce981b3d6c928f90d69a58f0f28d75fe8183604051612018929190612e8c565b60405180910390a15050565b612052336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b612088576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166120d5576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5460075460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b612197336000357fffffffff000000000000000000000000000000000000000000000000000000001661245e565b6121cd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661221a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054821115612256576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604090205460ff161561229f576040517f3e49310000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff16111561230f576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018101541561234b576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556002820154905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811691908516907f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f9096906123f79085815260200190565b60405180910390a361244073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168483612568565b50505050565b600080548152600160205260408120610f0e906125e9565b60095460009060ff1615612490575060065473ffffffffffffffffffffffffffffffffffffffff838116911614610b74565b60075473ffffffffffffffffffffffffffffffffffffffff8481169116148061250b575073ffffffffffffffffffffffffffffffffffffffff831660009081526008602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b1561251857506001610b74565b50600092915050565b600061252e8585856126fb565b905081801561254d57506000838061254857612548612ef9565b858709115b156125605761255d600182612c46565b90505b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261191d91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061280c565b8054600090426fffffffffffffffffffffffffffffffff90911611801590610b745750505470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16421090565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526124409186918216906323b872dd906084016125a2565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631249c58b6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156126e757600080fd5b505af1158015612440573d6000803e3d6000fd5b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036127535783828161274957612749612ef9565b0492505050612805565b83811061279d576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401610d08565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b600061282e73ffffffffffffffffffffffffffffffffffffffff8416836128a2565b905080516000141580156128535750808060200190518101906128519190612f28565b155b1561191d576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610d08565b606061280583836000846000808573ffffffffffffffffffffffffffffffffffffffff1684866040516128d59190612f45565b60006040518083038185875af1925050503d8060008114612912576040519150601f19603f3d011682016040523d82523d6000602084013e612917565b606091505b5091509150612927868383612931565b9695505050505050565b60608261294657612941826129c0565b612805565b815115801561296a575073ffffffffffffffffffffffffffffffffffffffff84163b155b156129b9576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d08565b5080612805565b8051156129d05780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b8015158114612a0257600080fd5b600060208284031215612a2557600080fd5b813561280581612a05565b803573ffffffffffffffffffffffffffffffffffffffff81168114612a5457600080fd5b919050565b600060208284031215612a6b57600080fd5b61280582612a30565b600060208284031215612a8657600080fd5b5035919050565b60008060408385031215612aa057600080fd5b612aa983612a30565b946020939093013593505050565b600080600060608486031215612acc57600080fd5b612ad584612a30565b9250612ae360208501612a30565b9150604084013590509250925092565b600080600060408486031215612b0857600080fd5b612b1184612a30565b9250602084013567ffffffffffffffff80821115612b2e57600080fd5b818601915086601f830112612b4257600080fd5b813581811115612b5157600080fd5b8760208260061b8501011115612b6657600080fd5b6020830194508093505050509250925092565b600060608284031215612b8b57600080fd5b50919050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114612a5457600080fd5b60008060408385031215612bd457600080fd5b612bdd83612a30565b9150612beb60208401612b91565b90509250929050565b60008060408385031215612c0757600080fd5b82359150612beb60208401612a30565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610b7457610b74612c17565b6fffffffffffffffffffffffffffffffff818116838216019080821115612c8257612c82612c17565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060408284031215612cca57600080fd5b6040516040810181811067ffffffffffffffff82111715612d14577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052612d2083612b91565b81526020830135612d3081612a05565b60208201529392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612d6d57612d6d612c17565b5060010190565b63ffffffff81168114612a0257600080fd5b600060208284031215612d9857600080fd5b813561280581612d74565b77ffffffffffffffffffffffffffffffffffffffffffffffff81168114612a0257600080fd5b600060208284031215612ddb57600080fd5b813561280581612da3565b8135612df181612d74565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135612e3181612d74565b67ffffffff000000008160201b1690507fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000081848285161717855560408601359250612e7b83612da3565b921760409190911b90911617905550565b828152608081018235612e9e81612d74565b63ffffffff808216602085015260208501359150612ebb82612d74565b16604083810191909152830135612ed181612da3565b77ffffffffffffffffffffffffffffffffffffffffffffffff81166060840152509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600060208284031215612f3a57600080fd5b815161280581612a05565b6000825160005b81811015612f665760208186018101518583015201612f4c565b50600092019182525091905056fea2646970667358221220cfdaff998e353abb9c668f7edd4d4ce42c4258910eb90aa3e080ab341e9afa9f64736f6c63430008140033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/EpochLib.sol/EpochLib.json b/apps/dapp/abi/contracts/templegold/EpochLib.sol/EpochLib.json
new file mode 100644
index 000000000..2783bd1f0
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/EpochLib.sol/EpochLib.json
@@ -0,0 +1,10 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "EpochLib",
+ "sourceName": "contracts/templegold/EpochLib.sol",
+ "abi": [],
+ "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220415c2a8a426a1c12ca765ae08db3e2d6df4dd4c310a3fe54e92f39e68a6bfa1764736f6c634300081c0033",
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220415c2a8a426a1c12ca765ae08db3e2d6df4dd4c310a3fe54e92f39e68a6bfa1764736f6c634300081c0033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/SpiceAuction.sol/SpiceAuction.json b/apps/dapp/abi/contracts/templegold/SpiceAuction.sol/SpiceAuction.json
new file mode 100644
index 000000000..a331fe358
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/SpiceAuction.sol/SpiceAuction.json
@@ -0,0 +1,1211 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "SpiceAuction",
+ "sourceName": "contracts/templegold/SpiceAuction.sol",
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_templeGold",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_spiceToken",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_daoExecutor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_operator",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "_arbEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "mintChainId_",
+ "type": "uint32"
+ },
+ {
+ "internalType": "string",
+ "name": "_name",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "target",
+ "type": "address"
+ }
+ ],
+ "name": "AddressEmptyCode",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "AddressInsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AlreadyClaimed",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AlreadyRecovered",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AuctionActive",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AuctionEnded",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "CannotClaim",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotDeposit",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotStartAuction",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "EtherNotNeeded",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ExpectedNonZero",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "FailedInnerCall",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "required",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "balance",
+ "type": "uint256"
+ }
+ ],
+ "name": "InsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAccess",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAddress",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidConfigOperation",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidEpoch",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidOperation",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint16",
+ "name": "optionType",
+ "type": "uint16"
+ }
+ ],
+ "name": "InvalidOptionType",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidParam",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "MissingAuctionTokenConfig",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "NoConfig",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "NotEnoughAuctionTokens",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "x",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "y",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "denominator",
+ "type": "uint256"
+ }
+ ],
+ "name": "PRBMath_MulDiv_Overflow",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ReentrancyGuardReentrantCall",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RemoveAuctionConfig",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint8",
+ "name": "bits",
+ "type": "uint8"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "SafeCastOverflowedUintDowncast",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "SafeERC20FailedOperation",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "WithdrawFailed",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "configId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "AuctionConfigRemoved",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epoch",
+ "type": "uint256"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "duration",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "waitPeriod",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "startCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint160",
+ "name": "minimumDistributedAuctionToken",
+ "type": "uint160"
+ },
+ {
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "isTempleGoldAuctionToken",
+ "type": "bool"
+ },
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct ISpiceAuction.SpiceAuctionConfig",
+ "name": "config",
+ "type": "tuple"
+ }
+ ],
+ "name": "AuctionConfigSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "startTime",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "endTime",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "AuctionStarted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "bidTokenAmount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Claim",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "daoExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "DaoExecutorSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Deposit",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint32",
+ "name": "gas",
+ "type": "uint32"
+ }
+ ],
+ "name": "LzReceiveExecutorGasSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "operator",
+ "type": "address"
+ }
+ ],
+ "name": "OperatorSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "RedeemedTempleGoldBurned",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenRecovered",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "MAXIMUM_AUCTION_DURATION",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "MAXIMUM_AUCTION_WAIT_PERIOD",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "MINIMUM_AUCTION_PERIOD",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "auctionId",
+ "type": "uint256"
+ }
+ ],
+ "name": "auctionConfigs",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "duration",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "waitPeriod",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "startCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint160",
+ "name": "minimumDistributedAuctionToken",
+ "type": "uint160"
+ },
+ {
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "isTempleGoldAuctionToken",
+ "type": "bool"
+ },
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "bid",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bool",
+ "name": "useContractEth",
+ "type": "bool"
+ }
+ ],
+ "name": "burnAndNotify",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claim",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claimed",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "claimed",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claimedAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "claimedAmount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "currentEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "daoExecutor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "depositors",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "epochsWithoutBidsRecovered",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "recovered",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getAuctionBidAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "auctionId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getAuctionConfig",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "duration",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "waitPeriod",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "startCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint160",
+ "name": "minimumDistributedAuctionToken",
+ "type": "uint160"
+ },
+ {
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "isTempleGoldAuctionToken",
+ "type": "bool"
+ },
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ }
+ ],
+ "internalType": "struct ISpiceAuction.SpiceAuctionConfig",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getAuctionTokenAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getAuctionTokenForCurrentEpoch",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getClaimableForEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getEpochInfo",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "startTime",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint128",
+ "name": "endTime",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint256",
+ "name": "totalBidTokenAmount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "totalAuctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct IAuctionBase.EpochInfo",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "isActive",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "lzReceiveExecutorGas",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "operator",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ }
+ ],
+ "name": "recoverAuctionTokenForZeroBidAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "recoverToken",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "redeemedEpochs",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "redeemed",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "removeAuctionConfig",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "duration",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "waitPeriod",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "startCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint160",
+ "name": "minimumDistributedAuctionToken",
+ "type": "uint160"
+ },
+ {
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "isTempleGoldAuctionToken",
+ "type": "bool"
+ },
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ }
+ ],
+ "internalType": "struct ISpiceAuction.SpiceAuctionConfig",
+ "name": "_config",
+ "type": "tuple"
+ }
+ ],
+ "name": "setAuctionConfig",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_daoExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "setDaoExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_gas",
+ "type": "uint32"
+ }
+ ],
+ "name": "setLzReceiveExecutorGas",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_operator",
+ "type": "address"
+ }
+ ],
+ "name": "setOperator",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "spiceToken",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "startAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "templeGold",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address payable",
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "withdrawEth",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "stateMutability": "payable",
+ "type": "receive"
+ }
+ ],
+ "bytecode": "0x61012060405234801561001157600080fd5b506040516149d13803806149d1833981016040819052610030916100f9565b60016006556001600160a01b03868116608052600780546001600160a01b03199081168884161790915560088054909116868316179055871660a05263ffffffff83811660c052821660e052600961008882826102b3565b5050426101005250506008805463ffffffff60a01b191662014f8160a01b1790555061037192505050565b80516001600160a01b03811681146100ca57600080fd5b919050565b805163ffffffff811681146100ca57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600080600060e0888a03121561011457600080fd5b61011d886100b3565b965061012b602089016100b3565b9550610139604089016100b3565b9450610147606089016100b3565b9350610155608089016100cf565b925061016360a089016100cf565b60c08901519092506001600160401b0381111561017f57600080fd5b8801601f81018a1361019057600080fd5b80516001600160401b038111156101a9576101a96100e3565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101d7576101d76100e3565b6040528181528282016020018c10156101ef57600080fd5b60005b8281101561020e576020818501810151838301820152016101f2565b5060006020838301015280935050505092959891949750929550565b600181811c9082168061023e57607f821691505b60208210810361025e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156102ae57806000526020600020601f840160051c8101602085101561028b5750805b601f840160051c820191505b818110156102ab5760008155600101610297565b50505b505050565b81516001600160401b038111156102cc576102cc6100e3565b6102e0816102da845461022a565b84610264565b6020601f82116001811461031457600083156102fc5750848201515b600019600385901b1c1916600184901b1784556102ab565b600084815260208120601f198516915b828110156103445787850151825560209485019460019092019101610324565b50848210156103625786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e051610100516145b361041e6000396000611c370152600081816126830152613043015260006131950152600081816109a701528181611a35015281816121ea015281816126ff01528181612e1c01528181612e84015281816130190152818161309d0152818161321e015281816133a001526134620152600081816102bd01528181611a0f0152818161219301528181612e3d0152612e6301526145b36000f3fe6080604052600436106102385760003560e01c8063570ca73511610138578063b3ab15fb116100b0578063ce86cdfd1161007f578063e30e4e8a11610064578063e30e4e8a146109c9578063eee44acb146109e9578063f3ed8f2514610a1957600080fd5b8063ce86cdfd14610890578063e110dfda1461099557600080fd5b8063b3ab15fb14610804578063b6fc8fac14610824578063b791513a1461083b578063cd366b9c1461087057600080fd5b80637667180811610107578063a7229fd9116100ec578063a7229fd9146107ba578063ac8477ab146107da578063b0c36601146107f157600080fd5b80637667180814610785578063a300fbbb1461079a57600080fd5b8063570ca7351461070e578063607de07a1461073b57806367ae97e61461075b5780636b64c7691461077057600080fd5b80632cf702f8116101cb578063466c01b81161019a5780634dd6c8de1161017f5780634dd6c8de1461066f5780634e62917b146106aa57806355b4b1a4146106d657600080fd5b8063466c01b8146106175780634c92c5cd1461064f57600080fd5b80632cf702f814610595578063379607f5146105aa578063406194c5146105ca578063454a2ab3146105f757600080fd5b80631b9a91a4116102075780631b9a91a41461040657806322f3e2d41461042857806327cc4c431461043d5780632ac873f91461047c57600080fd5b80630627099b1461024457806306fdde03146102895780630ab54b36146102ab578063135022c21461030457600080fd5b3661023f57005b600080fd5b34801561025057600080fd5b5061027461025f366004613b34565b600d6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561029557600080fd5b5061029e610a49565b6040516102809190613bbb565b3480156102b757600080fd5b506102df7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610280565b34801561031057600080fd5b506103aa61031f366004613b34565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260016020818152604092839020835160808101855281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041692810192909252918201549281019290925260020154606082015290565b604051610280919060006080820190506fffffffffffffffffffffffffffffffff83511682526fffffffffffffffffffffffffffffffff6020840151166020830152604083015160408301526060830151606083015292915050565b34801561041257600080fd5b50610426610421366004613bf0565b610ad7565b005b34801561043457600080fd5b50610274610cc9565b34801561044957600080fd5b5061046e610458366004613b34565b6000908152600160208190526040909120015490565b604051908152602001610280565b34801561048857600080fd5b50610588610497366004613b34565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810191909152506000908152600a6020908152604091829020825160e081018452815463ffffffff808216835264010000000082048116948301949094526801000000000000000081049093169381019390935273ffffffffffffffffffffffffffffffffffffffff6c01000000000000000000000000909204821660608401526001810154808316608085015260ff7401000000000000000000000000000000000000000090910416151560a0840152600201541660c082015290565b6040516102809190613c1c565b3480156105a157600080fd5b50610426610ce6565b3480156105b657600080fd5b506104266105c5366004613b34565b611046565b3480156105d657600080fd5b506007546102df9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561060357600080fd5b50610426610612366004613b34565b6112f0565b34801561062357600080fd5b5061046e610632366004613bf0565b600260209081526000928352604080842090915290825290205481565b34801561065b57600080fd5b5061042661066a366004613ce0565b6115bb565b34801561067b57600080fd5b5061027461068a366004613bf0565b600360209081526000928352604080842090915290825290205460ff1681565b3480156106b657600080fd5b506106c162278d0081565b60405163ffffffff9091168152602001610280565b3480156106e257600080fd5b5061046e6106f1366004613bf0565b600460209081526000928352604080842090915290825290205481565b34801561071a57600080fd5b506008546102df9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561074757600080fd5b50610426610756366004613cfd565b6116d3565b34801561076757600080fd5b506102df611950565b34801561077c57600080fd5b50610426611a5b565b34801561079157600080fd5b5060005461046e565b3480156107a657600080fd5b5061046e6107b5366004613bf0565b611fac565b3480156107c657600080fd5b506104266107d5366004613d18565b6120b9565b3480156107e657600080fd5b506106c16276a70081565b6104266107ff366004613d72565b612565565b34801561081057600080fd5b5061042661081f366004613ce0565b61286b565b34801561083057600080fd5b506106c162093a8081565b34801561084757600080fd5b506008546106c19074010000000000000000000000000000000000000000900463ffffffff1681565b34801561087c57600080fd5b5061042661088b366004613db4565b612978565b34801561089c57600080fd5b506109386108ab366004613b34565b600a6020526000908152604090208054600182015460029092015463ffffffff8083169364010000000084048216936801000000000000000081049092169273ffffffffffffffffffffffffffffffffffffffff6c010000000000000000000000009093048316928281169260ff7401000000000000000000000000000000000000000090910416911687565b6040805163ffffffff98891681529688166020880152949096169385019390935273ffffffffffffffffffffffffffffffffffffffff91821660608501528116608084015290151560a083015290911660c082015260e001610280565b3480156109a157600080fd5b506102df7f000000000000000000000000000000000000000000000000000000000000000081565b3480156109d557600080fd5b506104266109e4366004613dd1565b612aac565b3480156109f557600080fd5b5061046e610a04366004613b34565b60009081526001602052604090206002015490565b348015610a2557600080fd5b50610274610a34366004613b34565b60056020526000908152604090205460ff1681565b60098054610a5690613df6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8290613df6565b8015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b505050505081565b60085473ffffffffffffffffffffffffffffffffffffffff163314801590610b17575060075473ffffffffffffffffffffffffffffffffffffffff163314155b15610b4e576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216610b9b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610bd5576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4781811015610c26576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526000600482015260248101839052604481018290526064015b60405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610c80576040519150601f19603f3d011682016040523d82523d6000602084013e610c85565b606091505b5050905080610cc3576040517f51fe4a3400000000000000000000000000000000000000000000000000000000815260048101849052602401610c1d565b50505050565b600080548152600160205260408120610ce190612da1565b905090565b60075473ffffffffffffffffffffffffffffffffffffffff163314610d37576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080548082526001602052604082208054919290916fffffffffffffffffffffffffffffffff169003610d97576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610da081612da1565b15610dd7576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600a81610de8866001613e78565b815260208101919091526040016000205463ffffffff1611905080610f90578154427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611610e68576040517fa0e9298400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a6020526040812090610e8082612df1565b600286015473ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020526040812080549395509193509091610ebf908490613e8b565b90915550506000858152600a60209081526040808320838155600180820180547fffffffffffffffffffffff000000000000000000000000000000000000000000169055600291820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055928390529083208381558083018490550191909155610f4d9086613e8b565b60005560408051868152602081018790527f5ef593cff3080a71aa942dc8e20fb32a38198f7cbc7095fa55324ededdcd98d6910160405180910390a15050505050565b610f9b600184613e78565b6000818152600a60205260408082208281556001810180547fffffffffffffffffffffff00000000000000000000000000000000000000000016905560020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055519194507f5ef593cff3080a71aa942dc8e20fb32a38198f7cbc7095fa55324ededdcd98d69161103891868252602082015260400190565b60405180910390a15b505050565b6000818152600160205260408120805490916fffffffffffffffffffffffffffffffff90911690036110a4576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115611109576040517fbf009dab00000000000000000000000000000000000000000000000000000000815260048101839052602401610c1d565b33600090815260036020908152604080832085845290915290205460ff161561115e576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600260209081526040808320858452909152812054908190036111b3576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600360209081526040808320868452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600a90915281209061120782612df1565b915050600061122c85600201548660010154600087612eae909392919063ffffffff16565b3360009081526004602090815260408083208a8452825280832084905573ffffffffffffffffffffffffffffffffffffffff86168352600b90915281208054929350839290919061127e908490613e78565b909155506112a5905073ffffffffffffffffffffffffffffffffffffffff83163383612ef5565b604080518781526020810186905290810182905233907f45c072aa05b9853b5a993de7a28bc332ee01404a628cec1a23ce0f659f842ef19060600160405180910390a2505050505050565b600080548082526001602052604090912061130a81612da1565b611340576040517f65ca8f5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260000361137a576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a602052604081209061139282612df1565b5060028301546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482018190529293506000918416906370a0823190602401602060405180830381865afa15801561140c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114309190613e9e565b905061145473ffffffffffffffffffffffffffffffffffffffff841633848a612f76565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908516906370a0823190602401602060405180830381865afa1580156114c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e89190613e9e565b90506114f48282613e8b565b881461152c576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526002602090815260408083208a8452909152812080548a9290611556908490613e78565b92505081905550878660010160008282546115719190613e78565b909155505060408051888152602081018a905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a25050505050505050565b60075473ffffffffffffffffffffffffffffffffffffffff16331461160c576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611659576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ffe46d4bbb89eab62693e8325c2c0b567b017d956f54941fb99110a372a152e37906020015b60405180910390a150565b60075473ffffffffffffffffffffffffffffffffffffffff163314611724576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054801561177d57600081815260016020526040902061174481612da1565b1561177b576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b62093a8061178e6020840184613db4565b63ffffffff1610806117b4575062278d006117ac6020840184613db4565b63ffffffff16115b806117d657506276a7006117ce6040840160208501613db4565b63ffffffff16115b1561180d576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61181d6040830160208401613db4565b63ffffffff161580611852575061183a6080830160608401613ce0565b73ffffffffffffffffffffffffffffffffffffffff16155b15611889576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061189b60e0840160c08501613ce0565b73ffffffffffffffffffffffffffffffffffffffff16036118e8576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118f3600182613e78565b6000818152600a6020526040902090915082906119108282613ede565b9050507fde766fad167141a0e1213696eeff0a28605b0c2a2228ac153d27ec3cd91121d681836040516119449291906140fe565b60405180910390a15050565b600080548152600a60209081526040808320815160e081018352815463ffffffff80821683526401000000008204811695830195909552680100000000000000008104909416928101929092526c0100000000000000000000000090920473ffffffffffffffffffffffffffffffffffffffff90811660608301526001830154808216608084015274010000000000000000000000000000000000000000900460ff16151560a083018190526002909301541660c082015290611a33577f0000000000000000000000000000000000000000000000000000000000000000611a55565b7f00000000000000000000000000000000000000000000000000000000000000005b91505090565b6000805490600a81611a6e846001613e78565b815260208101919091526040016000908120805490925063ffffffff169003611ac3576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181015473ffffffffffffffffffffffffffffffffffffffff1615801590611b065750600181015473ffffffffffffffffffffffffffffffffffffffff163314155b15611b3d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8115611c1f576000828152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041681850190815294820154818401526002909101546060820152868552600a90925290922054905164010000000090910463ffffffff16904290611bce9083906141e8565b6fffffffffffffffffffffffffffffffff161115611c18576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050611c93565b80544290611c5b90640100000000900463ffffffff167f0000000000000000000000000000000000000000000000000000000000000000613e78565b1115611c93576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c9e82612df1565b73ffffffffffffffffffffffffffffffffffffffff81166000818152600c60205260408082205490517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529395509350916370a0823190602401602060405180830381865afa158015611d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d409190613e9e565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b602052604081205491925090611d749084613e8b565b611d7e9083613e8b565b85549091506c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16600003611de2576040517f9f16f00800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16811015611e43576040517f2b049be300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054611e51906001613e78565b6000818155818152600160205260408120875492985091611e849068010000000000000000900463ffffffff16426141e8565b82547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161783558754909150600090611ed69063ffffffff16836141e8565b83546fffffffffffffffffffffffffffffffff828116700100000000000000000000000000000000029116178455600284018590559050611f178487613e78565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600c60209081526040918290209290925580518b81526fffffffffffffffffffffffffffffffff80861693820193909352918316908201526060810185905233907f2f0e07e2baf6351377b2a46b5ccf5cd22b494921f870da223157659e174918f99060800160405180910390a2505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020908152604080832084845290915281205460ff1615611fed575060006120b3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020908152604080832085845290915290205480158061202c575060005483115b1561203b5760009150506120b3565b6000838152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041693810193909352928301549082018190526002909201546060820181905290926120ae92859291612eae565b925050505b92915050565b60075473ffffffffffffffffffffffffffffffffffffffff16331461210a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216612157576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003612191576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561223957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156122c6578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968360405161229d91815260200190565b60405180910390a361104173ffffffffffffffffffffffffffffffffffffffff84168383612ef5565b600080548082526001602052604090912081156123bd5780546fffffffffffffffffffffffffffffffff1660000361232a576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611151580156123865750600a600061236d846001613e78565b815260208101919091526040016000205463ffffffff16155b156123bd576040517f97ea364c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa15801561242a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244e9190613e9e565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600b6020908152604080832054600c909252822054929350909161248e9190613e8b565b6124989083613e8b565b9050808511156124d4576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124f573ffffffffffffffffffffffffffffffffffffffff88168787612ef5565b8673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968760405161255491815260200190565b60405180910390a350505050505050565b61256d612fbc565b6000828152600d602052604090205460ff16156125b6576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600160205260408120805490916fffffffffffffffffffffffffffffffff9091169003612614576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612676576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341180156126ab57507f000000000000000000000000000000000000000000000000000000000000000063ffffffff1646145b156126e2576040517fba792cb900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a60205260408120906126fa82612df1565b5090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612782576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183015460008190036127c2576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051878152602081018390527f7100c4f922b370c0ad3218efd254665bfc8609664973b40534b2c4ea6ca28708910160405180910390a16000868152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600283015461285990829073ffffffffffffffffffffffffffffffffffffffff1687612fff565b505050506128676001600655565b5050565b60075473ffffffffffffffffffffffffffffffffffffffff1633146128bc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612909576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f99d737e0adf2c449d71890b86772885ec7959b152ddb265f76325b6e68e105d390600090a250565b60085473ffffffffffffffffffffffffffffffffffffffff1633148015906129b8575060075473ffffffffffffffffffffffffffffffffffffffff163314155b156129ef576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8063ffffffff16600003612a2f576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527fb12b811ee01ea66d1cd1a2f8ee470517b143478dafa635fd782430c34251d9f0906020016116c8565b60075473ffffffffffffffffffffffffffffffffffffffff163314612afd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612b4a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054821115612b86576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604090205460ff1615612bcf576040517f3e49310000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612c3f576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181015415612c7b576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a6020526040812090612c9382612df1565b600087815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600288015473ffffffffffffffffffffffffffffffffffffffff85168452600c909252822080549395509093508392909190612d0a908490613e8b565b925050819055508173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f909683604051612d7091815260200190565b60405180910390a3612d9973ffffffffffffffffffffffffffffffffffffffff83168683612ef5565b505050505050565b8054600090426fffffffffffffffffffffffffffffffff909116118015906120b35750505470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16421090565b6001810154600090819074010000000000000000000000000000000000000000900460ff16612e61577f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612ea4565b7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000005b9094909350915050565b6000612ebb858585613586565b9050818015612eda575060008380612ed557612ed5614210565b858709115b15612eed57612eea600182613e78565b90505b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261104191859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613697565b60405173ffffffffffffffffffffffffffffffffffffffff8481166024830152838116604483015260648201839052610cc39186918216906323b872dd90608401612f2f565b600260065403612ff8576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600655565b61304173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016833086612f76565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff164603613113576040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906342966c6890602401600060405180830381600087803b1580156130f657600080fd5b505af115801561310a573d6000803e3d6000fd5b50505050505050565b6008546000906131849074010000000000000000000000000000000000000000900463ffffffff168261317d604080517e03000000000000000000000000000000000000000000000000000000000000602082015281516002818303018152602290910190915290565b919061372d565b6040805160e08101825263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526000602080830182905282840189905260608301829052608083018590528351808201855282815260a08401528351908101845281815260c083015291517f3b6f743b000000000000000000000000000000000000000000000000000000008152929350917f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633b6f743b9061326a90859085906004016142b5565b6040805180830381865afa158015613286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132aa919061434f565b90508380156132b95750805147105b156133035780516040517fdb42144d000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152476044820152606401610c1d565b831580156133115750805134105b1561335b5780516040517fdb42144d000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152346044820152606401610c1d565b83156134235780516040517fc7c7f5b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c7c7f5b3916133d99086908690309060040161436b565b60c06040518083038185885af11580156133f7573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061341c91906143b5565b5050612d99565b80516040517fc7c7f5b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c7c7f5b39161349b9086908690339060040161436b565b60c06040518083038185885af11580156134b9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906134de91906143b5565b505080516000906134ef9034613e8b565b9050801561310a57604051600090339083908381818185875af1925050503d8060008114613539576040519150601f19603f3d011682016040523d82523d6000602084013e61353e565b606091505b505090508061357c576040517f51fe4a3400000000000000000000000000000000000000000000000000000000815260048101839052602401610c1d565b5050505050505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036135de578382816135d4576135d4614210565b0492505050613690565b838110613628576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401610c1d565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b60006136b973ffffffffffffffffffffffffffffffffffffffff8416836137b0565b905080516000141580156136de5750808060200190518101906136dc9190614473565b155b15611041576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610c1d565b606083600361373d8260006137be565b61ffff161461378a576137518160006137be565b6040517f3a51740d00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152602401610c1d565b6000613796858561383e565b90506137a4866001836138f0565b9250505b509392505050565b60606136908383600061395b565b60006137cb826002613e78565b83511015613835576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7431365f6f75744f66426f756e64730000000000000000000000006044820152606401610c1d565b50016002015190565b60606fffffffffffffffffffffffffffffffff8216156138a757604080517fffffffffffffffffffffffffffffffff00000000000000000000000000000000608086811b8216602084015285901b16603082015201604051602081830303815290604052613690565b6040517fffffffffffffffffffffffffffffffff00000000000000000000000000000000608085901b166020820152603001604051602081830303815290604052905092915050565b60608360036139008260006137be565b61ffff1614613914576137518160006137be565b8460016139218551613a14565b61392c906001614490565b86866040516020016139429594939291906144aa565b6040516020818303038152906040529150509392505050565b606081471015613999576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610c1d565b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516139c29190614561565b60006040518083038185875af1925050503d80600081146139ff576040519150601f19603f3d011682016040523d82523d6000602084013e613a04565b606091505b50915091506137a4868383613a60565b600061ffff821115613a5c576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526010600482015260248101839052604401610c1d565b5090565b606082613a7557613a7082613aef565b613690565b8151158015613a99575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613ae8576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610c1d565b5080613690565b805115613aff5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600060208284031215613b4657600080fd5b5035919050565b60005b83811015613b68578181015183820152602001613b50565b50506000910152565b60008151808452613b89816020860160208601613b4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006136906020830184613b71565b73ffffffffffffffffffffffffffffffffffffffff81168114613b3157600080fd5b60008060408385031215613c0357600080fd5b8235613c0e81613bce565b946020939093013593505050565b600060e08201905063ffffffff835116825263ffffffff602084015116602083015263ffffffff604084015116604083015273ffffffffffffffffffffffffffffffffffffffff606084015116606083015273ffffffffffffffffffffffffffffffffffffffff608084015116608083015260a0830151613ca160a084018215159052565b5060c0830151613cc960c084018273ffffffffffffffffffffffffffffffffffffffff169052565b5092915050565b8035613cdb81613bce565b919050565b600060208284031215613cf257600080fd5b813561369081613bce565b600060e0828403128015613d1057600080fd5b509092915050565b600080600060608486031215613d2d57600080fd5b8335613d3881613bce565b92506020840135613d4881613bce565b929592945050506040919091013590565b8015158114613b3157600080fd5b8035613cdb81613d59565b60008060408385031215613d8557600080fd5b823591506020830135613d9781613d59565b809150509250929050565b63ffffffff81168114613b3157600080fd5b600060208284031215613dc657600080fd5b813561369081613da2565b60008060408385031215613de457600080fd5b823591506020830135613d9781613bce565b600181811c90821680613e0a57607f821691505b602082108103613e43577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156120b3576120b3613e49565b818103818111156120b3576120b3613e49565b600060208284031215613eb057600080fd5b5051919050565b600081356120b381613da2565b600081356120b381613bce565b600081356120b381613d59565b8135613ee981613da2565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135613f2981613da2565b67ffffffff000000008160201b16837fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000841617178455505050613fae613f7160408401613eb7565b82547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1660409190911b6bffffffff000000000000000016178255565b613ffa613fbd60608401613ec4565b82546bffffffffffffffffffffffff1660609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016178255565b6001810161404f61400d60808501613ec4565b82547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff91909116178255565b6140a861405e60a08501613ed1565b8280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1691151560a01b74ff000000000000000000000000000000000000000016919091179055565b506128676140b860c08401613ec4565b6002830173ffffffffffffffffffffffffffffffffffffffff82167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161781555050565b8281526101008101823561411181613da2565b63ffffffff8116602084015250602083013561412c81613da2565b63ffffffff8116604084015250604083013561414781613da2565b63ffffffff811660608401525061416060608401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660808401525061418960808401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660a0840152506141b260a08401613d67565b80151560c0840152506141c760c08401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660e08401526137a8565b6fffffffffffffffffffffffffffffffff81811683821601908111156120b3576120b3613e49565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b63ffffffff81511682526020810151602083015260408101516040830152606081015160608301526000608082015160e0608085015261428260e0850182613b71565b905060a083015184820360a086015261429b8282613b71565b91505060c083015184820360c08601526120ae8282613b71565b6040815260006142c8604083018561423f565b905082151560208301529392505050565b6000604082840312156142eb57600080fd5b6040805190810167ffffffffffffffff81118282101715614335577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052825181526020928301519281019290925250919050565b60006040828403121561436157600080fd5b61369083836142d9565b60808152600061437e608083018661423f565b9050835160208301526020840151604083015273ffffffffffffffffffffffffffffffffffffffff83166060830152949350505050565b60008082840360c08112156143c957600080fd5b60808112156143d757600080fd5b506040516060810167ffffffffffffffff81118282101715614422577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405283518152602084015167ffffffffffffffff8116811461444457600080fd5b602082015261445685604086016142d9565b6040820152915061446a84608085016142d9565b90509250929050565b60006020828403121561448557600080fd5b815161369081613d59565b61ffff81811683821601908111156120b3576120b3613e49565b600086516144bc818460208b01613b4d565b80830190507fff000000000000000000000000000000000000000000000000000000000000008760f81b1681527fffff0000000000000000000000000000000000000000000000000000000000008660f01b1660018201527fff000000000000000000000000000000000000000000000000000000000000008560f81b1660038201528351614552816004840160208801613b4d565b01600401979650505050505050565b60008251614573818460208701613b4d565b919091019291505056fea2646970667358221220b6d77a257f3180c35565b75ca84601a62f8a7d27457944b6135dcb4341b816d964736f6c634300081c0033",
+ "deployedBytecode": "0x6080604052600436106102385760003560e01c8063570ca73511610138578063b3ab15fb116100b0578063ce86cdfd1161007f578063e30e4e8a11610064578063e30e4e8a146109c9578063eee44acb146109e9578063f3ed8f2514610a1957600080fd5b8063ce86cdfd14610890578063e110dfda1461099557600080fd5b8063b3ab15fb14610804578063b6fc8fac14610824578063b791513a1461083b578063cd366b9c1461087057600080fd5b80637667180811610107578063a7229fd9116100ec578063a7229fd9146107ba578063ac8477ab146107da578063b0c36601146107f157600080fd5b80637667180814610785578063a300fbbb1461079a57600080fd5b8063570ca7351461070e578063607de07a1461073b57806367ae97e61461075b5780636b64c7691461077057600080fd5b80632cf702f8116101cb578063466c01b81161019a5780634dd6c8de1161017f5780634dd6c8de1461066f5780634e62917b146106aa57806355b4b1a4146106d657600080fd5b8063466c01b8146106175780634c92c5cd1461064f57600080fd5b80632cf702f814610595578063379607f5146105aa578063406194c5146105ca578063454a2ab3146105f757600080fd5b80631b9a91a4116102075780631b9a91a41461040657806322f3e2d41461042857806327cc4c431461043d5780632ac873f91461047c57600080fd5b80630627099b1461024457806306fdde03146102895780630ab54b36146102ab578063135022c21461030457600080fd5b3661023f57005b600080fd5b34801561025057600080fd5b5061027461025f366004613b34565b600d6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561029557600080fd5b5061029e610a49565b6040516102809190613bbb565b3480156102b757600080fd5b506102df7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610280565b34801561031057600080fd5b506103aa61031f366004613b34565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260016020818152604092839020835160808101855281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041692810192909252918201549281019290925260020154606082015290565b604051610280919060006080820190506fffffffffffffffffffffffffffffffff83511682526fffffffffffffffffffffffffffffffff6020840151166020830152604083015160408301526060830151606083015292915050565b34801561041257600080fd5b50610426610421366004613bf0565b610ad7565b005b34801561043457600080fd5b50610274610cc9565b34801561044957600080fd5b5061046e610458366004613b34565b6000908152600160208190526040909120015490565b604051908152602001610280565b34801561048857600080fd5b50610588610497366004613b34565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810191909152506000908152600a6020908152604091829020825160e081018452815463ffffffff808216835264010000000082048116948301949094526801000000000000000081049093169381019390935273ffffffffffffffffffffffffffffffffffffffff6c01000000000000000000000000909204821660608401526001810154808316608085015260ff7401000000000000000000000000000000000000000090910416151560a0840152600201541660c082015290565b6040516102809190613c1c565b3480156105a157600080fd5b50610426610ce6565b3480156105b657600080fd5b506104266105c5366004613b34565b611046565b3480156105d657600080fd5b506007546102df9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561060357600080fd5b50610426610612366004613b34565b6112f0565b34801561062357600080fd5b5061046e610632366004613bf0565b600260209081526000928352604080842090915290825290205481565b34801561065b57600080fd5b5061042661066a366004613ce0565b6115bb565b34801561067b57600080fd5b5061027461068a366004613bf0565b600360209081526000928352604080842090915290825290205460ff1681565b3480156106b657600080fd5b506106c162278d0081565b60405163ffffffff9091168152602001610280565b3480156106e257600080fd5b5061046e6106f1366004613bf0565b600460209081526000928352604080842090915290825290205481565b34801561071a57600080fd5b506008546102df9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561074757600080fd5b50610426610756366004613cfd565b6116d3565b34801561076757600080fd5b506102df611950565b34801561077c57600080fd5b50610426611a5b565b34801561079157600080fd5b5060005461046e565b3480156107a657600080fd5b5061046e6107b5366004613bf0565b611fac565b3480156107c657600080fd5b506104266107d5366004613d18565b6120b9565b3480156107e657600080fd5b506106c16276a70081565b6104266107ff366004613d72565b612565565b34801561081057600080fd5b5061042661081f366004613ce0565b61286b565b34801561083057600080fd5b506106c162093a8081565b34801561084757600080fd5b506008546106c19074010000000000000000000000000000000000000000900463ffffffff1681565b34801561087c57600080fd5b5061042661088b366004613db4565b612978565b34801561089c57600080fd5b506109386108ab366004613b34565b600a6020526000908152604090208054600182015460029092015463ffffffff8083169364010000000084048216936801000000000000000081049092169273ffffffffffffffffffffffffffffffffffffffff6c010000000000000000000000009093048316928281169260ff7401000000000000000000000000000000000000000090910416911687565b6040805163ffffffff98891681529688166020880152949096169385019390935273ffffffffffffffffffffffffffffffffffffffff91821660608501528116608084015290151560a083015290911660c082015260e001610280565b3480156109a157600080fd5b506102df7f000000000000000000000000000000000000000000000000000000000000000081565b3480156109d557600080fd5b506104266109e4366004613dd1565b612aac565b3480156109f557600080fd5b5061046e610a04366004613b34565b60009081526001602052604090206002015490565b348015610a2557600080fd5b50610274610a34366004613b34565b60056020526000908152604090205460ff1681565b60098054610a5690613df6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8290613df6565b8015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b505050505081565b60085473ffffffffffffffffffffffffffffffffffffffff163314801590610b17575060075473ffffffffffffffffffffffffffffffffffffffff163314155b15610b4e576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216610b9b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610bd5576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4781811015610c26576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526000600482015260248101839052604481018290526064015b60405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610c80576040519150601f19603f3d011682016040523d82523d6000602084013e610c85565b606091505b5050905080610cc3576040517f51fe4a3400000000000000000000000000000000000000000000000000000000815260048101849052602401610c1d565b50505050565b600080548152600160205260408120610ce190612da1565b905090565b60075473ffffffffffffffffffffffffffffffffffffffff163314610d37576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080548082526001602052604082208054919290916fffffffffffffffffffffffffffffffff169003610d97576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610da081612da1565b15610dd7576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600a81610de8866001613e78565b815260208101919091526040016000205463ffffffff1611905080610f90578154427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611610e68576040517fa0e9298400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a6020526040812090610e8082612df1565b600286015473ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020526040812080549395509193509091610ebf908490613e8b565b90915550506000858152600a60209081526040808320838155600180820180547fffffffffffffffffffffff000000000000000000000000000000000000000000169055600291820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055928390529083208381558083018490550191909155610f4d9086613e8b565b60005560408051868152602081018790527f5ef593cff3080a71aa942dc8e20fb32a38198f7cbc7095fa55324ededdcd98d6910160405180910390a15050505050565b610f9b600184613e78565b6000818152600a60205260408082208281556001810180547fffffffffffffffffffffff00000000000000000000000000000000000000000016905560020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055519194507f5ef593cff3080a71aa942dc8e20fb32a38198f7cbc7095fa55324ededdcd98d69161103891868252602082015260400190565b60405180910390a15b505050565b6000818152600160205260408120805490916fffffffffffffffffffffffffffffffff90911690036110a4576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115611109576040517fbf009dab00000000000000000000000000000000000000000000000000000000815260048101839052602401610c1d565b33600090815260036020908152604080832085845290915290205460ff161561115e576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600260209081526040808320858452909152812054908190036111b3576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600360209081526040808320868452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600a90915281209061120782612df1565b915050600061122c85600201548660010154600087612eae909392919063ffffffff16565b3360009081526004602090815260408083208a8452825280832084905573ffffffffffffffffffffffffffffffffffffffff86168352600b90915281208054929350839290919061127e908490613e78565b909155506112a5905073ffffffffffffffffffffffffffffffffffffffff83163383612ef5565b604080518781526020810186905290810182905233907f45c072aa05b9853b5a993de7a28bc332ee01404a628cec1a23ce0f659f842ef19060600160405180910390a2505050505050565b600080548082526001602052604090912061130a81612da1565b611340576040517f65ca8f5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260000361137a576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a602052604081209061139282612df1565b5060028301546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482018190529293506000918416906370a0823190602401602060405180830381865afa15801561140c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114309190613e9e565b905061145473ffffffffffffffffffffffffffffffffffffffff841633848a612f76565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908516906370a0823190602401602060405180830381865afa1580156114c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e89190613e9e565b90506114f48282613e8b565b881461152c576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526002602090815260408083208a8452909152812080548a9290611556908490613e78565b92505081905550878660010160008282546115719190613e78565b909155505060408051888152602081018a905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a25050505050505050565b60075473ffffffffffffffffffffffffffffffffffffffff16331461160c576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611659576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ffe46d4bbb89eab62693e8325c2c0b567b017d956f54941fb99110a372a152e37906020015b60405180910390a150565b60075473ffffffffffffffffffffffffffffffffffffffff163314611724576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054801561177d57600081815260016020526040902061174481612da1565b1561177b576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b62093a8061178e6020840184613db4565b63ffffffff1610806117b4575062278d006117ac6020840184613db4565b63ffffffff16115b806117d657506276a7006117ce6040840160208501613db4565b63ffffffff16115b1561180d576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61181d6040830160208401613db4565b63ffffffff161580611852575061183a6080830160608401613ce0565b73ffffffffffffffffffffffffffffffffffffffff16155b15611889576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061189b60e0840160c08501613ce0565b73ffffffffffffffffffffffffffffffffffffffff16036118e8576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118f3600182613e78565b6000818152600a6020526040902090915082906119108282613ede565b9050507fde766fad167141a0e1213696eeff0a28605b0c2a2228ac153d27ec3cd91121d681836040516119449291906140fe565b60405180910390a15050565b600080548152600a60209081526040808320815160e081018352815463ffffffff80821683526401000000008204811695830195909552680100000000000000008104909416928101929092526c0100000000000000000000000090920473ffffffffffffffffffffffffffffffffffffffff90811660608301526001830154808216608084015274010000000000000000000000000000000000000000900460ff16151560a083018190526002909301541660c082015290611a33577f0000000000000000000000000000000000000000000000000000000000000000611a55565b7f00000000000000000000000000000000000000000000000000000000000000005b91505090565b6000805490600a81611a6e846001613e78565b815260208101919091526040016000908120805490925063ffffffff169003611ac3576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181015473ffffffffffffffffffffffffffffffffffffffff1615801590611b065750600181015473ffffffffffffffffffffffffffffffffffffffff163314155b15611b3d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8115611c1f576000828152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041681850190815294820154818401526002909101546060820152868552600a90925290922054905164010000000090910463ffffffff16904290611bce9083906141e8565b6fffffffffffffffffffffffffffffffff161115611c18576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050611c93565b80544290611c5b90640100000000900463ffffffff167f0000000000000000000000000000000000000000000000000000000000000000613e78565b1115611c93576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c9e82612df1565b73ffffffffffffffffffffffffffffffffffffffff81166000818152600c60205260408082205490517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529395509350916370a0823190602401602060405180830381865afa158015611d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d409190613e9e565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b602052604081205491925090611d749084613e8b565b611d7e9083613e8b565b85549091506c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16600003611de2576040517f9f16f00800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16811015611e43576040517f2b049be300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054611e51906001613e78565b6000818155818152600160205260408120875492985091611e849068010000000000000000900463ffffffff16426141e8565b82547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161783558754909150600090611ed69063ffffffff16836141e8565b83546fffffffffffffffffffffffffffffffff828116700100000000000000000000000000000000029116178455600284018590559050611f178487613e78565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600c60209081526040918290209290925580518b81526fffffffffffffffffffffffffffffffff80861693820193909352918316908201526060810185905233907f2f0e07e2baf6351377b2a46b5ccf5cd22b494921f870da223157659e174918f99060800160405180910390a2505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020908152604080832084845290915281205460ff1615611fed575060006120b3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020908152604080832085845290915290205480158061202c575060005483115b1561203b5760009150506120b3565b6000838152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041693810193909352928301549082018190526002909201546060820181905290926120ae92859291612eae565b925050505b92915050565b60075473ffffffffffffffffffffffffffffffffffffffff16331461210a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216612157576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003612191576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561223957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156122c6578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968360405161229d91815260200190565b60405180910390a361104173ffffffffffffffffffffffffffffffffffffffff84168383612ef5565b600080548082526001602052604090912081156123bd5780546fffffffffffffffffffffffffffffffff1660000361232a576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611151580156123865750600a600061236d846001613e78565b815260208101919091526040016000205463ffffffff16155b156123bd576040517f97ea364c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa15801561242a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244e9190613e9e565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600b6020908152604080832054600c909252822054929350909161248e9190613e8b565b6124989083613e8b565b9050808511156124d4576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124f573ffffffffffffffffffffffffffffffffffffffff88168787612ef5565b8673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968760405161255491815260200190565b60405180910390a350505050505050565b61256d612fbc565b6000828152600d602052604090205460ff16156125b6576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600160205260408120805490916fffffffffffffffffffffffffffffffff9091169003612614576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612676576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341180156126ab57507f000000000000000000000000000000000000000000000000000000000000000063ffffffff1646145b156126e2576040517fba792cb900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a60205260408120906126fa82612df1565b5090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612782576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183015460008190036127c2576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051878152602081018390527f7100c4f922b370c0ad3218efd254665bfc8609664973b40534b2c4ea6ca28708910160405180910390a16000868152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600283015461285990829073ffffffffffffffffffffffffffffffffffffffff1687612fff565b505050506128676001600655565b5050565b60075473ffffffffffffffffffffffffffffffffffffffff1633146128bc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612909576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f99d737e0adf2c449d71890b86772885ec7959b152ddb265f76325b6e68e105d390600090a250565b60085473ffffffffffffffffffffffffffffffffffffffff1633148015906129b8575060075473ffffffffffffffffffffffffffffffffffffffff163314155b156129ef576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8063ffffffff16600003612a2f576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527fb12b811ee01ea66d1cd1a2f8ee470517b143478dafa635fd782430c34251d9f0906020016116c8565b60075473ffffffffffffffffffffffffffffffffffffffff163314612afd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612b4a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054821115612b86576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604090205460ff1615612bcf576040517f3e49310000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612c3f576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181015415612c7b576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a6020526040812090612c9382612df1565b600087815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600288015473ffffffffffffffffffffffffffffffffffffffff85168452600c909252822080549395509093508392909190612d0a908490613e8b565b925050819055508173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f909683604051612d7091815260200190565b60405180910390a3612d9973ffffffffffffffffffffffffffffffffffffffff83168683612ef5565b505050505050565b8054600090426fffffffffffffffffffffffffffffffff909116118015906120b35750505470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16421090565b6001810154600090819074010000000000000000000000000000000000000000900460ff16612e61577f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612ea4565b7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000005b9094909350915050565b6000612ebb858585613586565b9050818015612eda575060008380612ed557612ed5614210565b858709115b15612eed57612eea600182613e78565b90505b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261104191859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613697565b60405173ffffffffffffffffffffffffffffffffffffffff8481166024830152838116604483015260648201839052610cc39186918216906323b872dd90608401612f2f565b600260065403612ff8576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600655565b61304173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016833086612f76565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff164603613113576040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906342966c6890602401600060405180830381600087803b1580156130f657600080fd5b505af115801561310a573d6000803e3d6000fd5b50505050505050565b6008546000906131849074010000000000000000000000000000000000000000900463ffffffff168261317d604080517e03000000000000000000000000000000000000000000000000000000000000602082015281516002818303018152602290910190915290565b919061372d565b6040805160e08101825263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526000602080830182905282840189905260608301829052608083018590528351808201855282815260a08401528351908101845281815260c083015291517f3b6f743b000000000000000000000000000000000000000000000000000000008152929350917f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633b6f743b9061326a90859085906004016142b5565b6040805180830381865afa158015613286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132aa919061434f565b90508380156132b95750805147105b156133035780516040517fdb42144d000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152476044820152606401610c1d565b831580156133115750805134105b1561335b5780516040517fdb42144d000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152346044820152606401610c1d565b83156134235780516040517fc7c7f5b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c7c7f5b3916133d99086908690309060040161436b565b60c06040518083038185885af11580156133f7573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061341c91906143b5565b5050612d99565b80516040517fc7c7f5b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c7c7f5b39161349b9086908690339060040161436b565b60c06040518083038185885af11580156134b9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906134de91906143b5565b505080516000906134ef9034613e8b565b9050801561310a57604051600090339083908381818185875af1925050503d8060008114613539576040519150601f19603f3d011682016040523d82523d6000602084013e61353e565b606091505b505090508061357c576040517f51fe4a3400000000000000000000000000000000000000000000000000000000815260048101839052602401610c1d565b5050505050505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036135de578382816135d4576135d4614210565b0492505050613690565b838110613628576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401610c1d565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b60006136b973ffffffffffffffffffffffffffffffffffffffff8416836137b0565b905080516000141580156136de5750808060200190518101906136dc9190614473565b155b15611041576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610c1d565b606083600361373d8260006137be565b61ffff161461378a576137518160006137be565b6040517f3a51740d00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152602401610c1d565b6000613796858561383e565b90506137a4866001836138f0565b9250505b509392505050565b60606136908383600061395b565b60006137cb826002613e78565b83511015613835576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7431365f6f75744f66426f756e64730000000000000000000000006044820152606401610c1d565b50016002015190565b60606fffffffffffffffffffffffffffffffff8216156138a757604080517fffffffffffffffffffffffffffffffff00000000000000000000000000000000608086811b8216602084015285901b16603082015201604051602081830303815290604052613690565b6040517fffffffffffffffffffffffffffffffff00000000000000000000000000000000608085901b166020820152603001604051602081830303815290604052905092915050565b60608360036139008260006137be565b61ffff1614613914576137518160006137be565b8460016139218551613a14565b61392c906001614490565b86866040516020016139429594939291906144aa565b6040516020818303038152906040529150509392505050565b606081471015613999576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610c1d565b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516139c29190614561565b60006040518083038185875af1925050503d80600081146139ff576040519150601f19603f3d011682016040523d82523d6000602084013e613a04565b606091505b50915091506137a4868383613a60565b600061ffff821115613a5c576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526010600482015260248101839052604401610c1d565b5090565b606082613a7557613a7082613aef565b613690565b8151158015613a99575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613ae8576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610c1d565b5080613690565b805115613aff5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600060208284031215613b4657600080fd5b5035919050565b60005b83811015613b68578181015183820152602001613b50565b50506000910152565b60008151808452613b89816020860160208601613b4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006136906020830184613b71565b73ffffffffffffffffffffffffffffffffffffffff81168114613b3157600080fd5b60008060408385031215613c0357600080fd5b8235613c0e81613bce565b946020939093013593505050565b600060e08201905063ffffffff835116825263ffffffff602084015116602083015263ffffffff604084015116604083015273ffffffffffffffffffffffffffffffffffffffff606084015116606083015273ffffffffffffffffffffffffffffffffffffffff608084015116608083015260a0830151613ca160a084018215159052565b5060c0830151613cc960c084018273ffffffffffffffffffffffffffffffffffffffff169052565b5092915050565b8035613cdb81613bce565b919050565b600060208284031215613cf257600080fd5b813561369081613bce565b600060e0828403128015613d1057600080fd5b509092915050565b600080600060608486031215613d2d57600080fd5b8335613d3881613bce565b92506020840135613d4881613bce565b929592945050506040919091013590565b8015158114613b3157600080fd5b8035613cdb81613d59565b60008060408385031215613d8557600080fd5b823591506020830135613d9781613d59565b809150509250929050565b63ffffffff81168114613b3157600080fd5b600060208284031215613dc657600080fd5b813561369081613da2565b60008060408385031215613de457600080fd5b823591506020830135613d9781613bce565b600181811c90821680613e0a57607f821691505b602082108103613e43577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156120b3576120b3613e49565b818103818111156120b3576120b3613e49565b600060208284031215613eb057600080fd5b5051919050565b600081356120b381613da2565b600081356120b381613bce565b600081356120b381613d59565b8135613ee981613da2565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135613f2981613da2565b67ffffffff000000008160201b16837fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000841617178455505050613fae613f7160408401613eb7565b82547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1660409190911b6bffffffff000000000000000016178255565b613ffa613fbd60608401613ec4565b82546bffffffffffffffffffffffff1660609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016178255565b6001810161404f61400d60808501613ec4565b82547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff91909116178255565b6140a861405e60a08501613ed1565b8280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1691151560a01b74ff000000000000000000000000000000000000000016919091179055565b506128676140b860c08401613ec4565b6002830173ffffffffffffffffffffffffffffffffffffffff82167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161781555050565b8281526101008101823561411181613da2565b63ffffffff8116602084015250602083013561412c81613da2565b63ffffffff8116604084015250604083013561414781613da2565b63ffffffff811660608401525061416060608401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660808401525061418960808401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660a0840152506141b260a08401613d67565b80151560c0840152506141c760c08401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660e08401526137a8565b6fffffffffffffffffffffffffffffffff81811683821601908111156120b3576120b3613e49565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b63ffffffff81511682526020810151602083015260408101516040830152606081015160608301526000608082015160e0608085015261428260e0850182613b71565b905060a083015184820360a086015261429b8282613b71565b91505060c083015184820360c08601526120ae8282613b71565b6040815260006142c8604083018561423f565b905082151560208301529392505050565b6000604082840312156142eb57600080fd5b6040805190810167ffffffffffffffff81118282101715614335577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052825181526020928301519281019290925250919050565b60006040828403121561436157600080fd5b61369083836142d9565b60808152600061437e608083018661423f565b9050835160208301526020840151604083015273ffffffffffffffffffffffffffffffffffffffff83166060830152949350505050565b60008082840360c08112156143c957600080fd5b60808112156143d757600080fd5b506040516060810167ffffffffffffffff81118282101715614422577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405283518152602084015167ffffffffffffffff8116811461444457600080fd5b602082015261445685604086016142d9565b6040820152915061446a84608085016142d9565b90509250929050565b60006020828403121561448557600080fd5b815161369081613d59565b61ffff81811683821601908111156120b3576120b3613e49565b600086516144bc818460208b01613b4d565b80830190507fff000000000000000000000000000000000000000000000000000000000000008760f81b1681527fffff0000000000000000000000000000000000000000000000000000000000008660f01b1660018201527fff000000000000000000000000000000000000000000000000000000000000008560f81b1660038201528351614552816004840160208801613b4d565b01600401979650505050505050565b60008251614573818460208701613b4d565b919091019291505056fea2646970667358221220b6d77a257f3180c35565b75ca84601a62f8a7d27457944b6135dcb4341b816d964736f6c634300081c0033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/SpiceAuctionFactory.sol/SpiceAuctionFactory.json b/apps/dapp/abi/contracts/templegold/SpiceAuctionFactory.sol/SpiceAuctionFactory.json
new file mode 100644
index 000000000..6691b15fc
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/SpiceAuctionFactory.sol/SpiceAuctionFactory.json
@@ -0,0 +1,478 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "SpiceAuctionFactory",
+ "sourceName": "contracts/templegold/SpiceAuctionFactory.sol",
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_rescuer",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_daoExecutor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_operator",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_templeGold",
+ "type": "address"
+ },
+ {
+ "internalType": "uint32",
+ "name": "_arbLzEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "mintChainId_",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAccess",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAddress",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidParam",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "id",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "auction",
+ "type": "address"
+ }
+ ],
+ "name": "AuctionCreated",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "ExplicitAccessSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "RescueModeSet",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "acceptExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spiceToken",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "name": "createAuction",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "daoExecutor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "id",
+ "type": "bytes32"
+ }
+ ],
+ "name": "deployedAuctions",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "auction",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "executor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "name": "explicitFunctionAccess",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spiceToken",
+ "type": "address"
+ }
+ ],
+ "name": "findAuctionForSpiceToken",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spiceToken",
+ "type": "address"
+ }
+ ],
+ "name": "getPairId",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "inRescueMode",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "operator",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rescuer",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "allowedCaller",
+ "type": "address"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowed",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct ITempleElevatedAccess.ExplicitAccess[]",
+ "name": "access",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setExplicitAccess",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "setRescueMode",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "templeGold",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+ ],
+ "bytecode": "0x61012060405234801561001157600080fd5b506040516160393803806160398339810160408190526100309161013a565b86866001600160a01b0382166100595760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b0381166100805760405163e6c4247b60e01b815260040160405180910390fd5b816001600160a01b0316816001600160a01b0316036100b25760405163e6c4247b60e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b03948516179091556001805490911691831691909117905594851660a05292841660c052921660805263ffffffff91821660e0521661010052506101c09050565b80516001600160a01b038116811461012157600080fd5b919050565b805163ffffffff8116811461012157600080fd5b600080600080600080600060e0888a03121561015557600080fd5b61015e8861010a565b965061016c6020890161010a565b955061017a6040890161010a565b94506101886060890161010a565b93506101966080890161010a565b92506101a460a08901610126565b91506101b260c08901610126565b905092959891949750929550565b60805160a05160c05160e05161010051615e04610235600039600061093d0152600061091c0152600081816101e301526108fb0152600081816101bc01526108da01526000818161030301528181610831015281816108b801528181610dcc01528181610e2d0152610eb40152615e046000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80638bb93e5d116100b2578063bfccf0ec11610081578063d9a349c111610066578063d9a349c1146102bd578063daeccc79146102d0578063e110dfda146102fe57600080fd5b8063bfccf0ec1461028a578063c34c08e51461029d57600080fd5b80638bb93e5d1461020d5780638ed46a0d146102435780639002540814610264578063b42138c21461027757600080fd5b806338a63183116100ee57806338a6318314610172578063406194c5146101b7578063570ca735146101de5780638112c4af1461020557600080fd5b8063032ef9011461012057806307f184f1146101355780631810fe7f146101485780631f2114051461016a575b600080fd5b61013361012e366004610fc8565b610325565b005b61013361014336600461100e565b6103d4565b6003546101559060ff1681565b60405190151581526020015b60405180910390f35b61013361050c565b6000546101929073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610161565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b61013361062b565b61019261021b366004611029565b60056020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b61025661025136600461100e565b61076b565b604051908152602001610161565b6101926102723660046110c0565b61077c565b61019261028536600461100e565b610a35565b610133610298366004611189565b610a6d565b6001546101929073ffffffffffffffffffffffffffffffffffffffff1681565b6101336102cb36600461100e565b610c6c565b6101556102de366004611241565b600260209081526000928352604080842090915290825290205460ff1681565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610376576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610425576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610472576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46003805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff16331461055d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff1633036105ae576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600480549091169055565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314610681576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff1633036106d2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b600061077682610db1565b92915050565b60006107ac336000357fffffffff0000000000000000000000000000000000000000000000000000000016610ee8565b6107e2576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831661082f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108b4576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f0000000000000000000000000000000000000000000000000000000000000000847f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008860405161096990610fab565b6109799796959493929190611274565b604051809103906000f080158015610995573d6000803e3d6000fd5b50905060006109a385610db1565b60008181526005602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091558251848152918201529192507f832e001c1b031a46bae65558b4362398dec9d31b642c5b1420b13fa0c0651343910160405180910390a1509392505050565b600080610a4183610db1565b60009081526005602052604090205473ffffffffffffffffffffffffffffffffffffffff169392505050565b610a9b336000357fffffffff0000000000000000000000000000000000000000000000000000000016610ee8565b610ad1576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610b1e576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b82811015610c6457848482818110610b5157610b51611371565b905060400201803603810190610b6791906113a0565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260028352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610b37565b505050505050565b610c9a336000357fffffffff0000000000000000000000000000000000000000000000000000000016610ee8565b610cd0576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610d1d576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045460015460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff161015610e82576040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000606090811b8216602084015284901b1660348201526048015b604051602081830303815290604052805190602001209050919050565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084811b821660208401527f0000000000000000000000000000000000000000000000000000000000000000901b166034820152604801610e65565b919050565b60035460009060ff1615610f1a575060005473ffffffffffffffffffffffffffffffffffffffff838116911614610776565b60015473ffffffffffffffffffffffffffffffffffffffff84811691161480610f95575073ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b15610fa257506001610776565b50600092915050565b6149d1806113fe83390190565b80358015158114610ee357600080fd5b600060208284031215610fda57600080fd5b610fe382610fb8565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610ee357600080fd5b60006020828403121561102057600080fd5b610fe382610fea565b60006020828403121561103b57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156110b8576110b8611042565b604052919050565b600080604083850312156110d357600080fd5b6110dc83610fea565b9150602083013567ffffffffffffffff8111156110f857600080fd5b8301601f8101851361110957600080fd5b803567ffffffffffffffff81111561112357611123611042565b61115460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611071565b81815286602083850101111561116957600080fd5b816020840160208301376000602083830101528093505050509250929050565b60008060006040848603121561119e57600080fd5b6111a784610fea565b9250602084013567ffffffffffffffff8111156111c357600080fd5b8401601f810186136111d457600080fd5b803567ffffffffffffffff8111156111eb57600080fd5b8660208260061b840101111561120057600080fd5b939660209190910195509293505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ee357600080fd5b6000806040838503121561125457600080fd5b61125d83610fea565b915061126b60208401611211565b90509250929050565b73ffffffffffffffffffffffffffffffffffffffff8816815273ffffffffffffffffffffffffffffffffffffffff8716602082015273ffffffffffffffffffffffffffffffffffffffff8616604082015273ffffffffffffffffffffffffffffffffffffffff8516606082015263ffffffff8416608082015263ffffffff831660a082015260e060c0820152600082518060e084015260005b8181101561132b57602081860181015161010086840101520161130d565b50600061010082850101526101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505098975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060408284031280156113b357600080fd5b506040805190810167ffffffffffffffff811182821017156113d7576113d7611042565b6040526113e383611211565b81526113f160208401610fb8565b6020820152939250505056fe61012060405234801561001157600080fd5b506040516149d13803806149d1833981016040819052610030916100f9565b60016006556001600160a01b03868116608052600780546001600160a01b03199081168884161790915560088054909116868316179055871660a05263ffffffff83811660c052821660e052600961008882826102b3565b5050426101005250506008805463ffffffff60a01b191662014f8160a01b1790555061037192505050565b80516001600160a01b03811681146100ca57600080fd5b919050565b805163ffffffff811681146100ca57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600080600060e0888a03121561011457600080fd5b61011d886100b3565b965061012b602089016100b3565b9550610139604089016100b3565b9450610147606089016100b3565b9350610155608089016100cf565b925061016360a089016100cf565b60c08901519092506001600160401b0381111561017f57600080fd5b8801601f81018a1361019057600080fd5b80516001600160401b038111156101a9576101a96100e3565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101d7576101d76100e3565b6040528181528282016020018c10156101ef57600080fd5b60005b8281101561020e576020818501810151838301820152016101f2565b5060006020838301015280935050505092959891949750929550565b600181811c9082168061023e57607f821691505b60208210810361025e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156102ae57806000526020600020601f840160051c8101602085101561028b5750805b601f840160051c820191505b818110156102ab5760008155600101610297565b50505b505050565b81516001600160401b038111156102cc576102cc6100e3565b6102e0816102da845461022a565b84610264565b6020601f82116001811461031457600083156102fc5750848201515b600019600385901b1c1916600184901b1784556102ab565b600084815260208120601f198516915b828110156103445787850151825560209485019460019092019101610324565b50848210156103625786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e051610100516145b361041e6000396000611c370152600081816126830152613043015260006131950152600081816109a701528181611a35015281816121ea015281816126ff01528181612e1c01528181612e84015281816130190152818161309d0152818161321e015281816133a001526134620152600081816102bd01528181611a0f0152818161219301528181612e3d0152612e6301526145b36000f3fe6080604052600436106102385760003560e01c8063570ca73511610138578063b3ab15fb116100b0578063ce86cdfd1161007f578063e30e4e8a11610064578063e30e4e8a146109c9578063eee44acb146109e9578063f3ed8f2514610a1957600080fd5b8063ce86cdfd14610890578063e110dfda1461099557600080fd5b8063b3ab15fb14610804578063b6fc8fac14610824578063b791513a1461083b578063cd366b9c1461087057600080fd5b80637667180811610107578063a7229fd9116100ec578063a7229fd9146107ba578063ac8477ab146107da578063b0c36601146107f157600080fd5b80637667180814610785578063a300fbbb1461079a57600080fd5b8063570ca7351461070e578063607de07a1461073b57806367ae97e61461075b5780636b64c7691461077057600080fd5b80632cf702f8116101cb578063466c01b81161019a5780634dd6c8de1161017f5780634dd6c8de1461066f5780634e62917b146106aa57806355b4b1a4146106d657600080fd5b8063466c01b8146106175780634c92c5cd1461064f57600080fd5b80632cf702f814610595578063379607f5146105aa578063406194c5146105ca578063454a2ab3146105f757600080fd5b80631b9a91a4116102075780631b9a91a41461040657806322f3e2d41461042857806327cc4c431461043d5780632ac873f91461047c57600080fd5b80630627099b1461024457806306fdde03146102895780630ab54b36146102ab578063135022c21461030457600080fd5b3661023f57005b600080fd5b34801561025057600080fd5b5061027461025f366004613b34565b600d6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561029557600080fd5b5061029e610a49565b6040516102809190613bbb565b3480156102b757600080fd5b506102df7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610280565b34801561031057600080fd5b506103aa61031f366004613b34565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260016020818152604092839020835160808101855281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041692810192909252918201549281019290925260020154606082015290565b604051610280919060006080820190506fffffffffffffffffffffffffffffffff83511682526fffffffffffffffffffffffffffffffff6020840151166020830152604083015160408301526060830151606083015292915050565b34801561041257600080fd5b50610426610421366004613bf0565b610ad7565b005b34801561043457600080fd5b50610274610cc9565b34801561044957600080fd5b5061046e610458366004613b34565b6000908152600160208190526040909120015490565b604051908152602001610280565b34801561048857600080fd5b50610588610497366004613b34565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810191909152506000908152600a6020908152604091829020825160e081018452815463ffffffff808216835264010000000082048116948301949094526801000000000000000081049093169381019390935273ffffffffffffffffffffffffffffffffffffffff6c01000000000000000000000000909204821660608401526001810154808316608085015260ff7401000000000000000000000000000000000000000090910416151560a0840152600201541660c082015290565b6040516102809190613c1c565b3480156105a157600080fd5b50610426610ce6565b3480156105b657600080fd5b506104266105c5366004613b34565b611046565b3480156105d657600080fd5b506007546102df9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561060357600080fd5b50610426610612366004613b34565b6112f0565b34801561062357600080fd5b5061046e610632366004613bf0565b600260209081526000928352604080842090915290825290205481565b34801561065b57600080fd5b5061042661066a366004613ce0565b6115bb565b34801561067b57600080fd5b5061027461068a366004613bf0565b600360209081526000928352604080842090915290825290205460ff1681565b3480156106b657600080fd5b506106c162278d0081565b60405163ffffffff9091168152602001610280565b3480156106e257600080fd5b5061046e6106f1366004613bf0565b600460209081526000928352604080842090915290825290205481565b34801561071a57600080fd5b506008546102df9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561074757600080fd5b50610426610756366004613cfd565b6116d3565b34801561076757600080fd5b506102df611950565b34801561077c57600080fd5b50610426611a5b565b34801561079157600080fd5b5060005461046e565b3480156107a657600080fd5b5061046e6107b5366004613bf0565b611fac565b3480156107c657600080fd5b506104266107d5366004613d18565b6120b9565b3480156107e657600080fd5b506106c16276a70081565b6104266107ff366004613d72565b612565565b34801561081057600080fd5b5061042661081f366004613ce0565b61286b565b34801561083057600080fd5b506106c162093a8081565b34801561084757600080fd5b506008546106c19074010000000000000000000000000000000000000000900463ffffffff1681565b34801561087c57600080fd5b5061042661088b366004613db4565b612978565b34801561089c57600080fd5b506109386108ab366004613b34565b600a6020526000908152604090208054600182015460029092015463ffffffff8083169364010000000084048216936801000000000000000081049092169273ffffffffffffffffffffffffffffffffffffffff6c010000000000000000000000009093048316928281169260ff7401000000000000000000000000000000000000000090910416911687565b6040805163ffffffff98891681529688166020880152949096169385019390935273ffffffffffffffffffffffffffffffffffffffff91821660608501528116608084015290151560a083015290911660c082015260e001610280565b3480156109a157600080fd5b506102df7f000000000000000000000000000000000000000000000000000000000000000081565b3480156109d557600080fd5b506104266109e4366004613dd1565b612aac565b3480156109f557600080fd5b5061046e610a04366004613b34565b60009081526001602052604090206002015490565b348015610a2557600080fd5b50610274610a34366004613b34565b60056020526000908152604090205460ff1681565b60098054610a5690613df6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8290613df6565b8015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b505050505081565b60085473ffffffffffffffffffffffffffffffffffffffff163314801590610b17575060075473ffffffffffffffffffffffffffffffffffffffff163314155b15610b4e576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216610b9b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610bd5576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4781811015610c26576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526000600482015260248101839052604481018290526064015b60405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610c80576040519150601f19603f3d011682016040523d82523d6000602084013e610c85565b606091505b5050905080610cc3576040517f51fe4a3400000000000000000000000000000000000000000000000000000000815260048101849052602401610c1d565b50505050565b600080548152600160205260408120610ce190612da1565b905090565b60075473ffffffffffffffffffffffffffffffffffffffff163314610d37576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080548082526001602052604082208054919290916fffffffffffffffffffffffffffffffff169003610d97576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610da081612da1565b15610dd7576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600a81610de8866001613e78565b815260208101919091526040016000205463ffffffff1611905080610f90578154427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611610e68576040517fa0e9298400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a6020526040812090610e8082612df1565b600286015473ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020526040812080549395509193509091610ebf908490613e8b565b90915550506000858152600a60209081526040808320838155600180820180547fffffffffffffffffffffff000000000000000000000000000000000000000000169055600291820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055928390529083208381558083018490550191909155610f4d9086613e8b565b60005560408051868152602081018790527f5ef593cff3080a71aa942dc8e20fb32a38198f7cbc7095fa55324ededdcd98d6910160405180910390a15050505050565b610f9b600184613e78565b6000818152600a60205260408082208281556001810180547fffffffffffffffffffffff00000000000000000000000000000000000000000016905560020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055519194507f5ef593cff3080a71aa942dc8e20fb32a38198f7cbc7095fa55324ededdcd98d69161103891868252602082015260400190565b60405180910390a15b505050565b6000818152600160205260408120805490916fffffffffffffffffffffffffffffffff90911690036110a4576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115611109576040517fbf009dab00000000000000000000000000000000000000000000000000000000815260048101839052602401610c1d565b33600090815260036020908152604080832085845290915290205460ff161561115e576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600260209081526040808320858452909152812054908190036111b3576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600360209081526040808320868452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600a90915281209061120782612df1565b915050600061122c85600201548660010154600087612eae909392919063ffffffff16565b3360009081526004602090815260408083208a8452825280832084905573ffffffffffffffffffffffffffffffffffffffff86168352600b90915281208054929350839290919061127e908490613e78565b909155506112a5905073ffffffffffffffffffffffffffffffffffffffff83163383612ef5565b604080518781526020810186905290810182905233907f45c072aa05b9853b5a993de7a28bc332ee01404a628cec1a23ce0f659f842ef19060600160405180910390a2505050505050565b600080548082526001602052604090912061130a81612da1565b611340576040517f65ca8f5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260000361137a576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a602052604081209061139282612df1565b5060028301546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482018190529293506000918416906370a0823190602401602060405180830381865afa15801561140c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114309190613e9e565b905061145473ffffffffffffffffffffffffffffffffffffffff841633848a612f76565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908516906370a0823190602401602060405180830381865afa1580156114c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e89190613e9e565b90506114f48282613e8b565b881461152c576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526002602090815260408083208a8452909152812080548a9290611556908490613e78565b92505081905550878660010160008282546115719190613e78565b909155505060408051888152602081018a905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a25050505050505050565b60075473ffffffffffffffffffffffffffffffffffffffff16331461160c576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611659576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ffe46d4bbb89eab62693e8325c2c0b567b017d956f54941fb99110a372a152e37906020015b60405180910390a150565b60075473ffffffffffffffffffffffffffffffffffffffff163314611724576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054801561177d57600081815260016020526040902061174481612da1565b1561177b576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b62093a8061178e6020840184613db4565b63ffffffff1610806117b4575062278d006117ac6020840184613db4565b63ffffffff16115b806117d657506276a7006117ce6040840160208501613db4565b63ffffffff16115b1561180d576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61181d6040830160208401613db4565b63ffffffff161580611852575061183a6080830160608401613ce0565b73ffffffffffffffffffffffffffffffffffffffff16155b15611889576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061189b60e0840160c08501613ce0565b73ffffffffffffffffffffffffffffffffffffffff16036118e8576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118f3600182613e78565b6000818152600a6020526040902090915082906119108282613ede565b9050507fde766fad167141a0e1213696eeff0a28605b0c2a2228ac153d27ec3cd91121d681836040516119449291906140fe565b60405180910390a15050565b600080548152600a60209081526040808320815160e081018352815463ffffffff80821683526401000000008204811695830195909552680100000000000000008104909416928101929092526c0100000000000000000000000090920473ffffffffffffffffffffffffffffffffffffffff90811660608301526001830154808216608084015274010000000000000000000000000000000000000000900460ff16151560a083018190526002909301541660c082015290611a33577f0000000000000000000000000000000000000000000000000000000000000000611a55565b7f00000000000000000000000000000000000000000000000000000000000000005b91505090565b6000805490600a81611a6e846001613e78565b815260208101919091526040016000908120805490925063ffffffff169003611ac3576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181015473ffffffffffffffffffffffffffffffffffffffff1615801590611b065750600181015473ffffffffffffffffffffffffffffffffffffffff163314155b15611b3d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8115611c1f576000828152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041681850190815294820154818401526002909101546060820152868552600a90925290922054905164010000000090910463ffffffff16904290611bce9083906141e8565b6fffffffffffffffffffffffffffffffff161115611c18576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050611c93565b80544290611c5b90640100000000900463ffffffff167f0000000000000000000000000000000000000000000000000000000000000000613e78565b1115611c93576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c9e82612df1565b73ffffffffffffffffffffffffffffffffffffffff81166000818152600c60205260408082205490517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529395509350916370a0823190602401602060405180830381865afa158015611d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d409190613e9e565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b602052604081205491925090611d749084613e8b565b611d7e9083613e8b565b85549091506c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16600003611de2576040517f9f16f00800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16811015611e43576040517f2b049be300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054611e51906001613e78565b6000818155818152600160205260408120875492985091611e849068010000000000000000900463ffffffff16426141e8565b82547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161783558754909150600090611ed69063ffffffff16836141e8565b83546fffffffffffffffffffffffffffffffff828116700100000000000000000000000000000000029116178455600284018590559050611f178487613e78565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600c60209081526040918290209290925580518b81526fffffffffffffffffffffffffffffffff80861693820193909352918316908201526060810185905233907f2f0e07e2baf6351377b2a46b5ccf5cd22b494921f870da223157659e174918f99060800160405180910390a2505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020908152604080832084845290915281205460ff1615611fed575060006120b3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020908152604080832085845290915290205480158061202c575060005483115b1561203b5760009150506120b3565b6000838152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041693810193909352928301549082018190526002909201546060820181905290926120ae92859291612eae565b925050505b92915050565b60075473ffffffffffffffffffffffffffffffffffffffff16331461210a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216612157576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003612191576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561223957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156122c6578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968360405161229d91815260200190565b60405180910390a361104173ffffffffffffffffffffffffffffffffffffffff84168383612ef5565b600080548082526001602052604090912081156123bd5780546fffffffffffffffffffffffffffffffff1660000361232a576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611151580156123865750600a600061236d846001613e78565b815260208101919091526040016000205463ffffffff16155b156123bd576040517f97ea364c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa15801561242a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244e9190613e9e565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600b6020908152604080832054600c909252822054929350909161248e9190613e8b565b6124989083613e8b565b9050808511156124d4576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124f573ffffffffffffffffffffffffffffffffffffffff88168787612ef5565b8673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968760405161255491815260200190565b60405180910390a350505050505050565b61256d612fbc565b6000828152600d602052604090205460ff16156125b6576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600160205260408120805490916fffffffffffffffffffffffffffffffff9091169003612614576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612676576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341180156126ab57507f000000000000000000000000000000000000000000000000000000000000000063ffffffff1646145b156126e2576040517fba792cb900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a60205260408120906126fa82612df1565b5090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612782576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183015460008190036127c2576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051878152602081018390527f7100c4f922b370c0ad3218efd254665bfc8609664973b40534b2c4ea6ca28708910160405180910390a16000868152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600283015461285990829073ffffffffffffffffffffffffffffffffffffffff1687612fff565b505050506128676001600655565b5050565b60075473ffffffffffffffffffffffffffffffffffffffff1633146128bc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612909576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f99d737e0adf2c449d71890b86772885ec7959b152ddb265f76325b6e68e105d390600090a250565b60085473ffffffffffffffffffffffffffffffffffffffff1633148015906129b8575060075473ffffffffffffffffffffffffffffffffffffffff163314155b156129ef576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8063ffffffff16600003612a2f576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527fb12b811ee01ea66d1cd1a2f8ee470517b143478dafa635fd782430c34251d9f0906020016116c8565b60075473ffffffffffffffffffffffffffffffffffffffff163314612afd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612b4a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054821115612b86576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604090205460ff1615612bcf576040517f3e49310000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612c3f576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181015415612c7b576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a6020526040812090612c9382612df1565b600087815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600288015473ffffffffffffffffffffffffffffffffffffffff85168452600c909252822080549395509093508392909190612d0a908490613e8b565b925050819055508173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f909683604051612d7091815260200190565b60405180910390a3612d9973ffffffffffffffffffffffffffffffffffffffff83168683612ef5565b505050505050565b8054600090426fffffffffffffffffffffffffffffffff909116118015906120b35750505470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16421090565b6001810154600090819074010000000000000000000000000000000000000000900460ff16612e61577f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612ea4565b7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000005b9094909350915050565b6000612ebb858585613586565b9050818015612eda575060008380612ed557612ed5614210565b858709115b15612eed57612eea600182613e78565b90505b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261104191859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613697565b60405173ffffffffffffffffffffffffffffffffffffffff8481166024830152838116604483015260648201839052610cc39186918216906323b872dd90608401612f2f565b600260065403612ff8576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600655565b61304173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016833086612f76565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff164603613113576040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906342966c6890602401600060405180830381600087803b1580156130f657600080fd5b505af115801561310a573d6000803e3d6000fd5b50505050505050565b6008546000906131849074010000000000000000000000000000000000000000900463ffffffff168261317d604080517e03000000000000000000000000000000000000000000000000000000000000602082015281516002818303018152602290910190915290565b919061372d565b6040805160e08101825263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526000602080830182905282840189905260608301829052608083018590528351808201855282815260a08401528351908101845281815260c083015291517f3b6f743b000000000000000000000000000000000000000000000000000000008152929350917f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633b6f743b9061326a90859085906004016142b5565b6040805180830381865afa158015613286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132aa919061434f565b90508380156132b95750805147105b156133035780516040517fdb42144d000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152476044820152606401610c1d565b831580156133115750805134105b1561335b5780516040517fdb42144d000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152346044820152606401610c1d565b83156134235780516040517fc7c7f5b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c7c7f5b3916133d99086908690309060040161436b565b60c06040518083038185885af11580156133f7573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061341c91906143b5565b5050612d99565b80516040517fc7c7f5b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c7c7f5b39161349b9086908690339060040161436b565b60c06040518083038185885af11580156134b9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906134de91906143b5565b505080516000906134ef9034613e8b565b9050801561310a57604051600090339083908381818185875af1925050503d8060008114613539576040519150601f19603f3d011682016040523d82523d6000602084013e61353e565b606091505b505090508061357c576040517f51fe4a3400000000000000000000000000000000000000000000000000000000815260048101839052602401610c1d565b5050505050505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036135de578382816135d4576135d4614210565b0492505050613690565b838110613628576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401610c1d565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b60006136b973ffffffffffffffffffffffffffffffffffffffff8416836137b0565b905080516000141580156136de5750808060200190518101906136dc9190614473565b155b15611041576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610c1d565b606083600361373d8260006137be565b61ffff161461378a576137518160006137be565b6040517f3a51740d00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152602401610c1d565b6000613796858561383e565b90506137a4866001836138f0565b9250505b509392505050565b60606136908383600061395b565b60006137cb826002613e78565b83511015613835576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7431365f6f75744f66426f756e64730000000000000000000000006044820152606401610c1d565b50016002015190565b60606fffffffffffffffffffffffffffffffff8216156138a757604080517fffffffffffffffffffffffffffffffff00000000000000000000000000000000608086811b8216602084015285901b16603082015201604051602081830303815290604052613690565b6040517fffffffffffffffffffffffffffffffff00000000000000000000000000000000608085901b166020820152603001604051602081830303815290604052905092915050565b60608360036139008260006137be565b61ffff1614613914576137518160006137be565b8460016139218551613a14565b61392c906001614490565b86866040516020016139429594939291906144aa565b6040516020818303038152906040529150509392505050565b606081471015613999576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610c1d565b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516139c29190614561565b60006040518083038185875af1925050503d80600081146139ff576040519150601f19603f3d011682016040523d82523d6000602084013e613a04565b606091505b50915091506137a4868383613a60565b600061ffff821115613a5c576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526010600482015260248101839052604401610c1d565b5090565b606082613a7557613a7082613aef565b613690565b8151158015613a99575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613ae8576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610c1d565b5080613690565b805115613aff5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600060208284031215613b4657600080fd5b5035919050565b60005b83811015613b68578181015183820152602001613b50565b50506000910152565b60008151808452613b89816020860160208601613b4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006136906020830184613b71565b73ffffffffffffffffffffffffffffffffffffffff81168114613b3157600080fd5b60008060408385031215613c0357600080fd5b8235613c0e81613bce565b946020939093013593505050565b600060e08201905063ffffffff835116825263ffffffff602084015116602083015263ffffffff604084015116604083015273ffffffffffffffffffffffffffffffffffffffff606084015116606083015273ffffffffffffffffffffffffffffffffffffffff608084015116608083015260a0830151613ca160a084018215159052565b5060c0830151613cc960c084018273ffffffffffffffffffffffffffffffffffffffff169052565b5092915050565b8035613cdb81613bce565b919050565b600060208284031215613cf257600080fd5b813561369081613bce565b600060e0828403128015613d1057600080fd5b509092915050565b600080600060608486031215613d2d57600080fd5b8335613d3881613bce565b92506020840135613d4881613bce565b929592945050506040919091013590565b8015158114613b3157600080fd5b8035613cdb81613d59565b60008060408385031215613d8557600080fd5b823591506020830135613d9781613d59565b809150509250929050565b63ffffffff81168114613b3157600080fd5b600060208284031215613dc657600080fd5b813561369081613da2565b60008060408385031215613de457600080fd5b823591506020830135613d9781613bce565b600181811c90821680613e0a57607f821691505b602082108103613e43577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156120b3576120b3613e49565b818103818111156120b3576120b3613e49565b600060208284031215613eb057600080fd5b5051919050565b600081356120b381613da2565b600081356120b381613bce565b600081356120b381613d59565b8135613ee981613da2565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135613f2981613da2565b67ffffffff000000008160201b16837fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000841617178455505050613fae613f7160408401613eb7565b82547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1660409190911b6bffffffff000000000000000016178255565b613ffa613fbd60608401613ec4565b82546bffffffffffffffffffffffff1660609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016178255565b6001810161404f61400d60808501613ec4565b82547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff91909116178255565b6140a861405e60a08501613ed1565b8280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1691151560a01b74ff000000000000000000000000000000000000000016919091179055565b506128676140b860c08401613ec4565b6002830173ffffffffffffffffffffffffffffffffffffffff82167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161781555050565b8281526101008101823561411181613da2565b63ffffffff8116602084015250602083013561412c81613da2565b63ffffffff8116604084015250604083013561414781613da2565b63ffffffff811660608401525061416060608401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660808401525061418960808401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660a0840152506141b260a08401613d67565b80151560c0840152506141c760c08401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660e08401526137a8565b6fffffffffffffffffffffffffffffffff81811683821601908111156120b3576120b3613e49565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b63ffffffff81511682526020810151602083015260408101516040830152606081015160608301526000608082015160e0608085015261428260e0850182613b71565b905060a083015184820360a086015261429b8282613b71565b91505060c083015184820360c08601526120ae8282613b71565b6040815260006142c8604083018561423f565b905082151560208301529392505050565b6000604082840312156142eb57600080fd5b6040805190810167ffffffffffffffff81118282101715614335577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052825181526020928301519281019290925250919050565b60006040828403121561436157600080fd5b61369083836142d9565b60808152600061437e608083018661423f565b9050835160208301526020840151604083015273ffffffffffffffffffffffffffffffffffffffff83166060830152949350505050565b60008082840360c08112156143c957600080fd5b60808112156143d757600080fd5b506040516060810167ffffffffffffffff81118282101715614422577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405283518152602084015167ffffffffffffffff8116811461444457600080fd5b602082015261445685604086016142d9565b6040820152915061446a84608085016142d9565b90509250929050565b60006020828403121561448557600080fd5b815161369081613d59565b61ffff81811683821601908111156120b3576120b3613e49565b600086516144bc818460208b01613b4d565b80830190507fff000000000000000000000000000000000000000000000000000000000000008760f81b1681527fffff0000000000000000000000000000000000000000000000000000000000008660f01b1660018201527fff000000000000000000000000000000000000000000000000000000000000008560f81b1660038201528351614552816004840160208801613b4d565b01600401979650505050505050565b60008251614573818460208701613b4d565b919091019291505056fea2646970667358221220b6d77a257f3180c35565b75ca84601a62f8a7d27457944b6135dcb4341b816d964736f6c634300081c0033a26469706673582212201ec58c6c32b373a34abd47af372644cd3569dbc9f4754a01ede8b0a1cb825de664736f6c634300081c0033",
+ "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011b5760003560e01c80638bb93e5d116100b2578063bfccf0ec11610081578063d9a349c111610066578063d9a349c1146102bd578063daeccc79146102d0578063e110dfda146102fe57600080fd5b8063bfccf0ec1461028a578063c34c08e51461029d57600080fd5b80638bb93e5d1461020d5780638ed46a0d146102435780639002540814610264578063b42138c21461027757600080fd5b806338a63183116100ee57806338a6318314610172578063406194c5146101b7578063570ca735146101de5780638112c4af1461020557600080fd5b8063032ef9011461012057806307f184f1146101355780631810fe7f146101485780631f2114051461016a575b600080fd5b61013361012e366004610fc8565b610325565b005b61013361014336600461100e565b6103d4565b6003546101559060ff1681565b60405190151581526020015b60405180910390f35b61013361050c565b6000546101929073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610161565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b61013361062b565b61019261021b366004611029565b60056020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b61025661025136600461100e565b61076b565b604051908152602001610161565b6101926102723660046110c0565b61077c565b61019261028536600461100e565b610a35565b610133610298366004611189565b610a6d565b6001546101929073ffffffffffffffffffffffffffffffffffffffff1681565b6101336102cb36600461100e565b610c6c565b6101556102de366004611241565b600260209081526000928352604080842090915290825290205460ff1681565b6101927f000000000000000000000000000000000000000000000000000000000000000081565b60005473ffffffffffffffffffffffffffffffffffffffff163314610376576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610425576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610472576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46003805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff16331461055d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff1633036105ae576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600480549091169055565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314610681576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff1633036106d2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b600061077682610db1565b92915050565b60006107ac336000357fffffffff0000000000000000000000000000000000000000000000000000000016610ee8565b6107e2576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831661082f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108b4576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f0000000000000000000000000000000000000000000000000000000000000000847f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008860405161096990610fab565b6109799796959493929190611274565b604051809103906000f080158015610995573d6000803e3d6000fd5b50905060006109a385610db1565b60008181526005602090815260409182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87169081179091558251848152918201529192507f832e001c1b031a46bae65558b4362398dec9d31b642c5b1420b13fa0c0651343910160405180910390a1509392505050565b600080610a4183610db1565b60009081526005602052604090205473ffffffffffffffffffffffffffffffffffffffff169392505050565b610a9b336000357fffffffff0000000000000000000000000000000000000000000000000000000016610ee8565b610ad1576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610b1e576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b82811015610c6457848482818110610b5157610b51611371565b905060400201803603810190610b6791906113a0565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260028352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610b37565b505050505050565b610c9a336000357fffffffff0000000000000000000000000000000000000000000000000000000016610ee8565b610cd0576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610d1d576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045460015460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008173ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff161015610e82576040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000606090811b8216602084015284901b1660348201526048015b604051602081830303815290604052805190602001209050919050565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084811b821660208401527f0000000000000000000000000000000000000000000000000000000000000000901b166034820152604801610e65565b919050565b60035460009060ff1615610f1a575060005473ffffffffffffffffffffffffffffffffffffffff838116911614610776565b60015473ffffffffffffffffffffffffffffffffffffffff84811691161480610f95575073ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b15610fa257506001610776565b50600092915050565b6149d1806113fe83390190565b80358015158114610ee357600080fd5b600060208284031215610fda57600080fd5b610fe382610fb8565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610ee357600080fd5b60006020828403121561102057600080fd5b610fe382610fea565b60006020828403121561103b57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156110b8576110b8611042565b604052919050565b600080604083850312156110d357600080fd5b6110dc83610fea565b9150602083013567ffffffffffffffff8111156110f857600080fd5b8301601f8101851361110957600080fd5b803567ffffffffffffffff81111561112357611123611042565b61115460207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611071565b81815286602083850101111561116957600080fd5b816020840160208301376000602083830101528093505050509250929050565b60008060006040848603121561119e57600080fd5b6111a784610fea565b9250602084013567ffffffffffffffff8111156111c357600080fd5b8401601f810186136111d457600080fd5b803567ffffffffffffffff8111156111eb57600080fd5b8660208260061b840101111561120057600080fd5b939660209190910195509293505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114610ee357600080fd5b6000806040838503121561125457600080fd5b61125d83610fea565b915061126b60208401611211565b90509250929050565b73ffffffffffffffffffffffffffffffffffffffff8816815273ffffffffffffffffffffffffffffffffffffffff8716602082015273ffffffffffffffffffffffffffffffffffffffff8616604082015273ffffffffffffffffffffffffffffffffffffffff8516606082015263ffffffff8416608082015263ffffffff831660a082015260e060c0820152600082518060e084015260005b8181101561132b57602081860181015161010086840101520161130d565b50600061010082850101526101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505098975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060408284031280156113b357600080fd5b506040805190810167ffffffffffffffff811182821017156113d7576113d7611042565b6040526113e383611211565b81526113f160208401610fb8565b6020820152939250505056fe61012060405234801561001157600080fd5b506040516149d13803806149d1833981016040819052610030916100f9565b60016006556001600160a01b03868116608052600780546001600160a01b03199081168884161790915560088054909116868316179055871660a05263ffffffff83811660c052821660e052600961008882826102b3565b5050426101005250506008805463ffffffff60a01b191662014f8160a01b1790555061037192505050565b80516001600160a01b03811681146100ca57600080fd5b919050565b805163ffffffff811681146100ca57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600080600060e0888a03121561011457600080fd5b61011d886100b3565b965061012b602089016100b3565b9550610139604089016100b3565b9450610147606089016100b3565b9350610155608089016100cf565b925061016360a089016100cf565b60c08901519092506001600160401b0381111561017f57600080fd5b8801601f81018a1361019057600080fd5b80516001600160401b038111156101a9576101a96100e3565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101d7576101d76100e3565b6040528181528282016020018c10156101ef57600080fd5b60005b8281101561020e576020818501810151838301820152016101f2565b5060006020838301015280935050505092959891949750929550565b600181811c9082168061023e57607f821691505b60208210810361025e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156102ae57806000526020600020601f840160051c8101602085101561028b5750805b601f840160051c820191505b818110156102ab5760008155600101610297565b50505b505050565b81516001600160401b038111156102cc576102cc6100e3565b6102e0816102da845461022a565b84610264565b6020601f82116001811461031457600083156102fc5750848201515b600019600385901b1c1916600184901b1784556102ab565b600084815260208120601f198516915b828110156103445787850151825560209485019460019092019101610324565b50848210156103625786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e051610100516145b361041e6000396000611c370152600081816126830152613043015260006131950152600081816109a701528181611a35015281816121ea015281816126ff01528181612e1c01528181612e84015281816130190152818161309d0152818161321e015281816133a001526134620152600081816102bd01528181611a0f0152818161219301528181612e3d0152612e6301526145b36000f3fe6080604052600436106102385760003560e01c8063570ca73511610138578063b3ab15fb116100b0578063ce86cdfd1161007f578063e30e4e8a11610064578063e30e4e8a146109c9578063eee44acb146109e9578063f3ed8f2514610a1957600080fd5b8063ce86cdfd14610890578063e110dfda1461099557600080fd5b8063b3ab15fb14610804578063b6fc8fac14610824578063b791513a1461083b578063cd366b9c1461087057600080fd5b80637667180811610107578063a7229fd9116100ec578063a7229fd9146107ba578063ac8477ab146107da578063b0c36601146107f157600080fd5b80637667180814610785578063a300fbbb1461079a57600080fd5b8063570ca7351461070e578063607de07a1461073b57806367ae97e61461075b5780636b64c7691461077057600080fd5b80632cf702f8116101cb578063466c01b81161019a5780634dd6c8de1161017f5780634dd6c8de1461066f5780634e62917b146106aa57806355b4b1a4146106d657600080fd5b8063466c01b8146106175780634c92c5cd1461064f57600080fd5b80632cf702f814610595578063379607f5146105aa578063406194c5146105ca578063454a2ab3146105f757600080fd5b80631b9a91a4116102075780631b9a91a41461040657806322f3e2d41461042857806327cc4c431461043d5780632ac873f91461047c57600080fd5b80630627099b1461024457806306fdde03146102895780630ab54b36146102ab578063135022c21461030457600080fd5b3661023f57005b600080fd5b34801561025057600080fd5b5061027461025f366004613b34565b600d6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561029557600080fd5b5061029e610a49565b6040516102809190613bbb565b3480156102b757600080fd5b506102df7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610280565b34801561031057600080fd5b506103aa61031f366004613b34565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260016020818152604092839020835160808101855281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041692810192909252918201549281019290925260020154606082015290565b604051610280919060006080820190506fffffffffffffffffffffffffffffffff83511682526fffffffffffffffffffffffffffffffff6020840151166020830152604083015160408301526060830151606083015292915050565b34801561041257600080fd5b50610426610421366004613bf0565b610ad7565b005b34801561043457600080fd5b50610274610cc9565b34801561044957600080fd5b5061046e610458366004613b34565b6000908152600160208190526040909120015490565b604051908152602001610280565b34801561048857600080fd5b50610588610497366004613b34565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810191909152506000908152600a6020908152604091829020825160e081018452815463ffffffff808216835264010000000082048116948301949094526801000000000000000081049093169381019390935273ffffffffffffffffffffffffffffffffffffffff6c01000000000000000000000000909204821660608401526001810154808316608085015260ff7401000000000000000000000000000000000000000090910416151560a0840152600201541660c082015290565b6040516102809190613c1c565b3480156105a157600080fd5b50610426610ce6565b3480156105b657600080fd5b506104266105c5366004613b34565b611046565b3480156105d657600080fd5b506007546102df9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561060357600080fd5b50610426610612366004613b34565b6112f0565b34801561062357600080fd5b5061046e610632366004613bf0565b600260209081526000928352604080842090915290825290205481565b34801561065b57600080fd5b5061042661066a366004613ce0565b6115bb565b34801561067b57600080fd5b5061027461068a366004613bf0565b600360209081526000928352604080842090915290825290205460ff1681565b3480156106b657600080fd5b506106c162278d0081565b60405163ffffffff9091168152602001610280565b3480156106e257600080fd5b5061046e6106f1366004613bf0565b600460209081526000928352604080842090915290825290205481565b34801561071a57600080fd5b506008546102df9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561074757600080fd5b50610426610756366004613cfd565b6116d3565b34801561076757600080fd5b506102df611950565b34801561077c57600080fd5b50610426611a5b565b34801561079157600080fd5b5060005461046e565b3480156107a657600080fd5b5061046e6107b5366004613bf0565b611fac565b3480156107c657600080fd5b506104266107d5366004613d18565b6120b9565b3480156107e657600080fd5b506106c16276a70081565b6104266107ff366004613d72565b612565565b34801561081057600080fd5b5061042661081f366004613ce0565b61286b565b34801561083057600080fd5b506106c162093a8081565b34801561084757600080fd5b506008546106c19074010000000000000000000000000000000000000000900463ffffffff1681565b34801561087c57600080fd5b5061042661088b366004613db4565b612978565b34801561089c57600080fd5b506109386108ab366004613b34565b600a6020526000908152604090208054600182015460029092015463ffffffff8083169364010000000084048216936801000000000000000081049092169273ffffffffffffffffffffffffffffffffffffffff6c010000000000000000000000009093048316928281169260ff7401000000000000000000000000000000000000000090910416911687565b6040805163ffffffff98891681529688166020880152949096169385019390935273ffffffffffffffffffffffffffffffffffffffff91821660608501528116608084015290151560a083015290911660c082015260e001610280565b3480156109a157600080fd5b506102df7f000000000000000000000000000000000000000000000000000000000000000081565b3480156109d557600080fd5b506104266109e4366004613dd1565b612aac565b3480156109f557600080fd5b5061046e610a04366004613b34565b60009081526001602052604090206002015490565b348015610a2557600080fd5b50610274610a34366004613b34565b60056020526000908152604090205460ff1681565b60098054610a5690613df6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8290613df6565b8015610acf5780601f10610aa457610100808354040283529160200191610acf565b820191906000526020600020905b815481529060010190602001808311610ab257829003601f168201915b505050505081565b60085473ffffffffffffffffffffffffffffffffffffffff163314801590610b17575060075473ffffffffffffffffffffffffffffffffffffffff163314155b15610b4e576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216610b9b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610bd5576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4781811015610c26576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526000600482015260248101839052604481018290526064015b60405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610c80576040519150601f19603f3d011682016040523d82523d6000602084013e610c85565b606091505b5050905080610cc3576040517f51fe4a3400000000000000000000000000000000000000000000000000000000815260048101849052602401610c1d565b50505050565b600080548152600160205260408120610ce190612da1565b905090565b60075473ffffffffffffffffffffffffffffffffffffffff163314610d37576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080548082526001602052604082208054919290916fffffffffffffffffffffffffffffffff169003610d97576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610da081612da1565b15610dd7576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600a81610de8866001613e78565b815260208101919091526040016000205463ffffffff1611905080610f90578154427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611610e68576040517fa0e9298400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a6020526040812090610e8082612df1565b600286015473ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020526040812080549395509193509091610ebf908490613e8b565b90915550506000858152600a60209081526040808320838155600180820180547fffffffffffffffffffffff000000000000000000000000000000000000000000169055600291820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055928390529083208381558083018490550191909155610f4d9086613e8b565b60005560408051868152602081018790527f5ef593cff3080a71aa942dc8e20fb32a38198f7cbc7095fa55324ededdcd98d6910160405180910390a15050505050565b610f9b600184613e78565b6000818152600a60205260408082208281556001810180547fffffffffffffffffffffff00000000000000000000000000000000000000000016905560020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055519194507f5ef593cff3080a71aa942dc8e20fb32a38198f7cbc7095fa55324ededdcd98d69161103891868252602082015260400190565b60405180910390a15b505050565b6000818152600160205260408120805490916fffffffffffffffffffffffffffffffff90911690036110a4576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115611109576040517fbf009dab00000000000000000000000000000000000000000000000000000000815260048101839052602401610c1d565b33600090815260036020908152604080832085845290915290205460ff161561115e576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600260209081526040808320858452909152812054908190036111b3576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600360209081526040808320868452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600a90915281209061120782612df1565b915050600061122c85600201548660010154600087612eae909392919063ffffffff16565b3360009081526004602090815260408083208a8452825280832084905573ffffffffffffffffffffffffffffffffffffffff86168352600b90915281208054929350839290919061127e908490613e78565b909155506112a5905073ffffffffffffffffffffffffffffffffffffffff83163383612ef5565b604080518781526020810186905290810182905233907f45c072aa05b9853b5a993de7a28bc332ee01404a628cec1a23ce0f659f842ef19060600160405180910390a2505050505050565b600080548082526001602052604090912061130a81612da1565b611340576040517f65ca8f5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260000361137a576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a602052604081209061139282612df1565b5060028301546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482018190529293506000918416906370a0823190602401602060405180830381865afa15801561140c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114309190613e9e565b905061145473ffffffffffffffffffffffffffffffffffffffff841633848a612f76565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152600091908516906370a0823190602401602060405180830381865afa1580156114c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e89190613e9e565b90506114f48282613e8b565b881461152c576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526002602090815260408083208a8452909152812080548a9290611556908490613e78565b92505081905550878660010160008282546115719190613e78565b909155505060408051888152602081018a905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a25050505050505050565b60075473ffffffffffffffffffffffffffffffffffffffff16331461160c576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611659576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ffe46d4bbb89eab62693e8325c2c0b567b017d956f54941fb99110a372a152e37906020015b60405180910390a150565b60075473ffffffffffffffffffffffffffffffffffffffff163314611724576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054801561177d57600081815260016020526040902061174481612da1565b1561177b576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b62093a8061178e6020840184613db4565b63ffffffff1610806117b4575062278d006117ac6020840184613db4565b63ffffffff16115b806117d657506276a7006117ce6040840160208501613db4565b63ffffffff16115b1561180d576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61181d6040830160208401613db4565b63ffffffff161580611852575061183a6080830160608401613ce0565b73ffffffffffffffffffffffffffffffffffffffff16155b15611889576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061189b60e0840160c08501613ce0565b73ffffffffffffffffffffffffffffffffffffffff16036118e8576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118f3600182613e78565b6000818152600a6020526040902090915082906119108282613ede565b9050507fde766fad167141a0e1213696eeff0a28605b0c2a2228ac153d27ec3cd91121d681836040516119449291906140fe565b60405180910390a15050565b600080548152600a60209081526040808320815160e081018352815463ffffffff80821683526401000000008204811695830195909552680100000000000000008104909416928101929092526c0100000000000000000000000090920473ffffffffffffffffffffffffffffffffffffffff90811660608301526001830154808216608084015274010000000000000000000000000000000000000000900460ff16151560a083018190526002909301541660c082015290611a33577f0000000000000000000000000000000000000000000000000000000000000000611a55565b7f00000000000000000000000000000000000000000000000000000000000000005b91505090565b6000805490600a81611a6e846001613e78565b815260208101919091526040016000908120805490925063ffffffff169003611ac3576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181015473ffffffffffffffffffffffffffffffffffffffff1615801590611b065750600181015473ffffffffffffffffffffffffffffffffffffffff163314155b15611b3d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8115611c1f576000828152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041681850190815294820154818401526002909101546060820152868552600a90925290922054905164010000000090910463ffffffff16904290611bce9083906141e8565b6fffffffffffffffffffffffffffffffff161115611c18576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050611c93565b80544290611c5b90640100000000900463ffffffff167f0000000000000000000000000000000000000000000000000000000000000000613e78565b1115611c93576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c9e82612df1565b73ffffffffffffffffffffffffffffffffffffffff81166000818152600c60205260408082205490517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529395509350916370a0823190602401602060405180830381865afa158015611d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d409190613e9e565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b602052604081205491925090611d749084613e8b565b611d7e9083613e8b565b85549091506c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16600003611de2576040517f9f16f00800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16811015611e43576040517f2b049be300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054611e51906001613e78565b6000818155818152600160205260408120875492985091611e849068010000000000000000900463ffffffff16426141e8565b82547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161783558754909150600090611ed69063ffffffff16836141e8565b83546fffffffffffffffffffffffffffffffff828116700100000000000000000000000000000000029116178455600284018590559050611f178487613e78565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600c60209081526040918290209290925580518b81526fffffffffffffffffffffffffffffffff80861693820193909352918316908201526060810185905233907f2f0e07e2baf6351377b2a46b5ccf5cd22b494921f870da223157659e174918f99060800160405180910390a2505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020908152604080832084845290915281205460ff1615611fed575060006120b3565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260026020908152604080832085845290915290205480158061202c575060005483115b1561203b5760009150506120b3565b6000838152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041693810193909352928301549082018190526002909201546060820181905290926120ae92859291612eae565b925050505b92915050565b60075473ffffffffffffffffffffffffffffffffffffffff16331461210a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216612157576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003612191576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561223957507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156122c6578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968360405161229d91815260200190565b60405180910390a361104173ffffffffffffffffffffffffffffffffffffffff84168383612ef5565b600080548082526001602052604090912081156123bd5780546fffffffffffffffffffffffffffffffff1660000361232a576040517f260e629b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611151580156123865750600a600061236d846001613e78565b815260208101919091526040016000205463ffffffff16155b156123bd576040517f97ea364c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa15801561242a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244e9190613e9e565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600b6020908152604080832054600c909252822054929350909161248e9190613e8b565b6124989083613e8b565b9050808511156124d4576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124f573ffffffffffffffffffffffffffffffffffffffff88168787612ef5565b8673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968760405161255491815260200190565b60405180910390a350505050505050565b61256d612fbc565b6000828152600d602052604090205460ff16156125b6576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600160205260408120805490916fffffffffffffffffffffffffffffffff9091169003612614576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612676576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000341180156126ab57507f000000000000000000000000000000000000000000000000000000000000000063ffffffff1646145b156126e2576040517fba792cb900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a60205260408120906126fa82612df1565b5090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612782576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183015460008190036127c2576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051878152602081018390527f7100c4f922b370c0ad3218efd254665bfc8609664973b40534b2c4ea6ca28708910160405180910390a16000868152600d6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600283015461285990829073ffffffffffffffffffffffffffffffffffffffff1687612fff565b505050506128676001600655565b5050565b60075473ffffffffffffffffffffffffffffffffffffffff1633146128bc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612909576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f99d737e0adf2c449d71890b86772885ec7959b152ddb265f76325b6e68e105d390600090a250565b60085473ffffffffffffffffffffffffffffffffffffffff1633148015906129b8575060075473ffffffffffffffffffffffffffffffffffffffff163314155b156129ef576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8063ffffffff16600003612a2f576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527fb12b811ee01ea66d1cd1a2f8ee470517b143478dafa635fd782430c34251d9f0906020016116c8565b60075473ffffffffffffffffffffffffffffffffffffffff163314612afd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612b4a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054821115612b86576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604090205460ff1615612bcf576040517f3e49310000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612c3f576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600181015415612c7b576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a6020526040812090612c9382612df1565b600087815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600288015473ffffffffffffffffffffffffffffffffffffffff85168452600c909252822080549395509093508392909190612d0a908490613e8b565b925050819055508173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f909683604051612d7091815260200190565b60405180910390a3612d9973ffffffffffffffffffffffffffffffffffffffff83168683612ef5565b505050505050565b8054600090426fffffffffffffffffffffffffffffffff909116118015906120b35750505470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16421090565b6001810154600090819074010000000000000000000000000000000000000000900460ff16612e61577f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612ea4565b7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000005b9094909350915050565b6000612ebb858585613586565b9050818015612eda575060008380612ed557612ed5614210565b858709115b15612eed57612eea600182613e78565b90505b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261104191859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613697565b60405173ffffffffffffffffffffffffffffffffffffffff8481166024830152838116604483015260648201839052610cc39186918216906323b872dd90608401612f2f565b600260065403612ff8576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600655565b61304173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016833086612f76565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff164603613113576040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906342966c6890602401600060405180830381600087803b1580156130f657600080fd5b505af115801561310a573d6000803e3d6000fd5b50505050505050565b6008546000906131849074010000000000000000000000000000000000000000900463ffffffff168261317d604080517e03000000000000000000000000000000000000000000000000000000000000602082015281516002818303018152602290910190915290565b919061372d565b6040805160e08101825263ffffffff7f00000000000000000000000000000000000000000000000000000000000000001681526000602080830182905282840189905260608301829052608083018590528351808201855282815260a08401528351908101845281815260c083015291517f3b6f743b000000000000000000000000000000000000000000000000000000008152929350917f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633b6f743b9061326a90859085906004016142b5565b6040805180830381865afa158015613286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132aa919061434f565b90508380156132b95750805147105b156133035780516040517fdb42144d000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152476044820152606401610c1d565b831580156133115750805134105b1561335b5780516040517fdb42144d000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152346044820152606401610c1d565b83156134235780516040517fc7c7f5b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c7c7f5b3916133d99086908690309060040161436b565b60c06040518083038185885af11580156133f7573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061341c91906143b5565b5050612d99565b80516040517fc7c7f5b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163c7c7f5b39161349b9086908690339060040161436b565b60c06040518083038185885af11580156134b9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906134de91906143b5565b505080516000906134ef9034613e8b565b9050801561310a57604051600090339083908381818185875af1925050503d8060008114613539576040519150601f19603f3d011682016040523d82523d6000602084013e61353e565b606091505b505090508061357c576040517f51fe4a3400000000000000000000000000000000000000000000000000000000815260048101839052602401610c1d565b5050505050505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036135de578382816135d4576135d4614210565b0492505050613690565b838110613628576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401610c1d565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b60006136b973ffffffffffffffffffffffffffffffffffffffff8416836137b0565b905080516000141580156136de5750808060200190518101906136dc9190614473565b155b15611041576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610c1d565b606083600361373d8260006137be565b61ffff161461378a576137518160006137be565b6040517f3a51740d00000000000000000000000000000000000000000000000000000000815261ffff9091166004820152602401610c1d565b6000613796858561383e565b90506137a4866001836138f0565b9250505b509392505050565b60606136908383600061395b565b60006137cb826002613e78565b83511015613835576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f746f55696e7431365f6f75744f66426f756e64730000000000000000000000006044820152606401610c1d565b50016002015190565b60606fffffffffffffffffffffffffffffffff8216156138a757604080517fffffffffffffffffffffffffffffffff00000000000000000000000000000000608086811b8216602084015285901b16603082015201604051602081830303815290604052613690565b6040517fffffffffffffffffffffffffffffffff00000000000000000000000000000000608085901b166020820152603001604051602081830303815290604052905092915050565b60608360036139008260006137be565b61ffff1614613914576137518160006137be565b8460016139218551613a14565b61392c906001614490565b86866040516020016139429594939291906144aa565b6040516020818303038152906040529150509392505050565b606081471015613999576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610c1d565b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516139c29190614561565b60006040518083038185875af1925050503d80600081146139ff576040519150601f19603f3d011682016040523d82523d6000602084013e613a04565b606091505b50915091506137a4868383613a60565b600061ffff821115613a5c576040517f6dfcc6500000000000000000000000000000000000000000000000000000000081526010600482015260248101839052604401610c1d565b5090565b606082613a7557613a7082613aef565b613690565b8151158015613a99575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613ae8576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610c1d565b5080613690565b805115613aff5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b600060208284031215613b4657600080fd5b5035919050565b60005b83811015613b68578181015183820152602001613b50565b50506000910152565b60008151808452613b89816020860160208601613b4d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006136906020830184613b71565b73ffffffffffffffffffffffffffffffffffffffff81168114613b3157600080fd5b60008060408385031215613c0357600080fd5b8235613c0e81613bce565b946020939093013593505050565b600060e08201905063ffffffff835116825263ffffffff602084015116602083015263ffffffff604084015116604083015273ffffffffffffffffffffffffffffffffffffffff606084015116606083015273ffffffffffffffffffffffffffffffffffffffff608084015116608083015260a0830151613ca160a084018215159052565b5060c0830151613cc960c084018273ffffffffffffffffffffffffffffffffffffffff169052565b5092915050565b8035613cdb81613bce565b919050565b600060208284031215613cf257600080fd5b813561369081613bce565b600060e0828403128015613d1057600080fd5b509092915050565b600080600060608486031215613d2d57600080fd5b8335613d3881613bce565b92506020840135613d4881613bce565b929592945050506040919091013590565b8015158114613b3157600080fd5b8035613cdb81613d59565b60008060408385031215613d8557600080fd5b823591506020830135613d9781613d59565b809150509250929050565b63ffffffff81168114613b3157600080fd5b600060208284031215613dc657600080fd5b813561369081613da2565b60008060408385031215613de457600080fd5b823591506020830135613d9781613bce565b600181811c90821680613e0a57607f821691505b602082108103613e43577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156120b3576120b3613e49565b818103818111156120b3576120b3613e49565b600060208284031215613eb057600080fd5b5051919050565b600081356120b381613da2565b600081356120b381613bce565b600081356120b381613d59565b8135613ee981613da2565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135613f2981613da2565b67ffffffff000000008160201b16837fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000841617178455505050613fae613f7160408401613eb7565b82547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff1660409190911b6bffffffff000000000000000016178255565b613ffa613fbd60608401613ec4565b82546bffffffffffffffffffffffff1660609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016178255565b6001810161404f61400d60808501613ec4565b82547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff91909116178255565b6140a861405e60a08501613ed1565b8280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1691151560a01b74ff000000000000000000000000000000000000000016919091179055565b506128676140b860c08401613ec4565b6002830173ffffffffffffffffffffffffffffffffffffffff82167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161781555050565b8281526101008101823561411181613da2565b63ffffffff8116602084015250602083013561412c81613da2565b63ffffffff8116604084015250604083013561414781613da2565b63ffffffff811660608401525061416060608401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660808401525061418960808401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660a0840152506141b260a08401613d67565b80151560c0840152506141c760c08401613cd0565b73ffffffffffffffffffffffffffffffffffffffff811660e08401526137a8565b6fffffffffffffffffffffffffffffffff81811683821601908111156120b3576120b3613e49565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b63ffffffff81511682526020810151602083015260408101516040830152606081015160608301526000608082015160e0608085015261428260e0850182613b71565b905060a083015184820360a086015261429b8282613b71565b91505060c083015184820360c08601526120ae8282613b71565b6040815260006142c8604083018561423f565b905082151560208301529392505050565b6000604082840312156142eb57600080fd5b6040805190810167ffffffffffffffff81118282101715614335577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052825181526020928301519281019290925250919050565b60006040828403121561436157600080fd5b61369083836142d9565b60808152600061437e608083018661423f565b9050835160208301526020840151604083015273ffffffffffffffffffffffffffffffffffffffff83166060830152949350505050565b60008082840360c08112156143c957600080fd5b60808112156143d757600080fd5b506040516060810167ffffffffffffffff81118282101715614422577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405283518152602084015167ffffffffffffffff8116811461444457600080fd5b602082015261445685604086016142d9565b6040820152915061446a84608085016142d9565b90509250929050565b60006020828403121561448557600080fd5b815161369081613d59565b61ffff81811683821601908111156120b3576120b3613e49565b600086516144bc818460208b01613b4d565b80830190507fff000000000000000000000000000000000000000000000000000000000000008760f81b1681527fffff0000000000000000000000000000000000000000000000000000000000008660f01b1660018201527fff000000000000000000000000000000000000000000000000000000000000008560f81b1660038201528351614552816004840160208801613b4d565b01600401979650505050505050565b60008251614573818460208701613b4d565b919091019291505056fea2646970667358221220b6d77a257f3180c35565b75ca84601a62f8a7d27457944b6135dcb4341b816d964736f6c634300081c0033a26469706673582212201ec58c6c32b373a34abd47af372644cd3569dbc9f4754a01ede8b0a1cb825de664736f6c634300081c0033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/StableGoldAuction.sol/StableGoldAuction.json b/apps/dapp/abi/contracts/templegold/StableGoldAuction.sol/StableGoldAuction.json
new file mode 100644
index 000000000..eae803bb6
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/StableGoldAuction.sol/StableGoldAuction.json
@@ -0,0 +1,1174 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "StableGoldAuction",
+ "sourceName": "contracts/templegold/StableGoldAuction.sol",
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_templeGold",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_bidToken",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_treasury",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_rescuer",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_auctionStarter",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "target",
+ "type": "address"
+ }
+ ],
+ "name": "AddressEmptyCode",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "AddressInsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AlreadyClaimed",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AlreadyRecovered",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AuctionActive",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "AuctionEnded",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "CannotClaim",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotDeposit",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotStartAuction",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ExpectedNonZero",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "FailedInnerCall",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAccess",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAddress",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "InvalidAmount",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidEpoch",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidOperation",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochGoldAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "LowGoldDistributed",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "x",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "y",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "denominator",
+ "type": "uint256"
+ }
+ ],
+ "name": "PRBMath_MulDiv_Overflow",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "SafeERC20FailedOperation",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "auctionsTimeDiff",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "auctionStartCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint192",
+ "name": "auctionMinimumDistributedGold",
+ "type": "uint192"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct IStableGoldAuction.AuctionConfig",
+ "name": "config",
+ "type": "tuple"
+ }
+ ],
+ "name": "AuctionConfigSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "startTime",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "endTime",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "AuctionStarted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ }
+ ],
+ "name": "AuctionStarterSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "bidToken",
+ "type": "address"
+ }
+ ],
+ "name": "BidTokenSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "user",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "bidTokenAmount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Claim",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Deposit",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "ExplicitAccessSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "timestamp",
+ "type": "uint256"
+ }
+ ],
+ "name": "GoldDistributionNotified",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "RescueModeSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenRecovered",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "AUCTION_DURATION",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "",
+ "type": "uint64"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "auctionStarter",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "bid",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "bidToken",
+ "outputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "canDeposit",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claim",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claimed",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "claimed",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "claimedAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "claimedAmount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "currentEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "depositors",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "distributeGold",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "epochGoldSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "epochsWithoutBidsRecovered",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "recovered",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "executor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "name": "explicitFunctionAccess",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getAuctionConfig",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "auctionsTimeDiff",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "auctionStartCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint192",
+ "name": "auctionMinimumDistributedGold",
+ "type": "uint192"
+ }
+ ],
+ "internalType": "struct IStableGoldAuction.AuctionConfig",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ }
+ ],
+ "name": "getClaimableAtCurrentEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "depositor",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getClaimableAtEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ }
+ ],
+ "name": "getEpochInfo",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "startTime",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint128",
+ "name": "endTime",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint256",
+ "name": "totalBidTokenAmount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "totalAuctionTokenAmount",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct IAuctionBase.EpochInfo",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "inRescueMode",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "isCurrentEpochEnded",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "nextAuctionGoldAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "nextEpoch",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "notifyDistribution",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "epochId",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ }
+ ],
+ "name": "recoverTempleGoldForZeroBidAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "recoverToken",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rescuer",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "auctionsTimeDiff",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "auctionStartCooldown",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint192",
+ "name": "auctionMinimumDistributedGold",
+ "type": "uint192"
+ }
+ ],
+ "internalType": "struct IStableGoldAuction.AuctionConfig",
+ "name": "_config",
+ "type": "tuple"
+ }
+ ],
+ "name": "setAuctionConfig",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_starter",
+ "type": "address"
+ }
+ ],
+ "name": "setAuctionStarter",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_bidToken",
+ "type": "address"
+ }
+ ],
+ "name": "setBidToken",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "allowedCaller",
+ "type": "address"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowed",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct ITempleElevatedAccess.ExplicitAccess[]",
+ "name": "access",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setExplicitAccess",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "setRescueMode",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "startAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "templeGold",
+ "outputs": [
+ {
+ "internalType": "contract ITempleGold",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "treasury",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+ ],
+ "bytecode": "0x60c060405234801561001057600080fd5b5060405161322338038061322383398101604081905261002f91610157565b82826001600160a01b0382166100585760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03811661007f5760405163e6c4247b60e01b815260040160405180910390fd5b816001600160a01b0316816001600160a01b0316036100b15760405163e6c4247b60e01b815260040160405180910390fd5b600680546001600160a01b03199081166001600160a01b039485161790915560078054821692841692909217909155878216608052600b8054821688841617905585821660a052600c805490911691831691821790556040517f9912e2a4535169ea3ec6c9138afab89a1ba028d9534726bbedd154a25f11392c90600090a25050505050506101cb565b80516001600160a01b038116811461015257600080fd5b919050565b60008060008060008060c0878903121561017057600080fd5b6101798761013b565b95506101876020880161013b565b94506101956040880161013b565b93506101a36060880161013b565b92506101b16080880161013b565b91506101bf60a0880161013b565b90509295509295509295565b60805160a051612ffb6102286000396000818161059a0152610fc90152600081816107b201528181610e970152818161123b015281816118b301528181611b83015281816124090152818161248001526126e80152612ffb6000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c8063766718081161017b578063ccb51004116100d8578063e110dfda1161008c578063e78a587511610071578063e78a5875146107e7578063f0234008146107ef578063f3ed8f251461081257600080fd5b8063e110dfda146107ad578063e36977cc146107d457600080fd5b8063d9a349c1116100bd578063d9a349c11461074c578063daeccc791461075f578063dfafd4fd1461078d57600080fd5b8063ccb5100414610731578063d2fbb3cb1461073957600080fd5b8063ab1b71bd1161012f578063b3ba0e2b11610114578063b3ba0e2b146106f5578063bfccf0ec146106fe578063c34c08e51461071157600080fd5b8063ab1b71bd146106da578063aea0e78b146106ed57600080fd5b80638503ae3d116101605780638503ae3d146105e7578063a271e525146106a4578063a7229fd9146106c757600080fd5b806376671808146105d75780638112c4af146105df57600080fd5b806338a6318311610229578063501ee126116101dd57806361d027b3116101c257806361d027b314610595578063654f2fc8146105bc5780636b64c769146105cf57600080fd5b8063501ee1261461055757806355b4b1a41461056a57600080fd5b8063454a2ab31161020e578063454a2ab3146104eb578063466c01b8146104fe5780634dd6c8de1461052957600080fd5b806338a6318314610489578063396939f2146104a957600080fd5b806314e21ecf116102805780631a7d73d0116102655780631a7d73d0146104295780631f2114051461046e578063379607f51461047657600080fd5b806314e21ecf146103eb5780631810fe7f1461040c57600080fd5b8063032ef901146102b257806307f184f1146102c7578063128e771b146102da578063135022c2146102ed575b600080fd5b6102c56102c0366004612a7a565b610835565b005b6102c56102d5366004612ac0565b6108e4565b6102c56102e8366004612ac0565b610a1c565b6103866102fb366004612adb565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260016020818152604092839020835160808101855281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041692810192909252918201549281019290925260020154606082015290565b6040516103e2919060006080820190506fffffffffffffffffffffffffffffffff83511682526fffffffffffffffffffffffffffffffff6020840151166020830152604083015160408301526060830151606083015292915050565b60405180910390f35b6103fe6103f9366004612ac0565b610b74565b6040519081526020016103e2565b6009546104199060ff1681565b60405190151581526020016103e2565b600c546104499073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103e2565b6102c5610b88565b6102c5610484366004612adb565b610ca7565b6006546104499073ffffffffffffffffffffffffffffffffffffffff1681565b61041960008054815260016020526040812054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115905090565b6102c56104f9366004612adb565b610f21565b6103fe61050c366004612af4565b600260209081526000928352604080842090915290825290205481565b610419610537366004612af4565b600360209081526000928352604080842090915290825290205460ff1681565b6102c5610565366004612ac0565b611088565b6103fe610578366004612af4565b600460209081526000928352604080842090915290825290205481565b6104497f000000000000000000000000000000000000000000000000000000000000000081565b6102c56105ca366004612adb565b611223565b6102c5611317565b6000546103fe565b6102c5611686565b61065d60408051606081018252600080825260208201819052918101919091525060408051606081018252600e5463ffffffff8082168352640100000000820416602083015268010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff169181019190915290565b60408051825163ffffffff9081168252602080850151909116908201529181015177ffffffffffffffffffffffffffffffffffffffffffffffff16908201526060016103e2565b6106ae62093a8081565b60405167ffffffffffffffff90911681526020016103e2565b6102c56106d5366004612b1e565b6117c6565b6103fe6106e8366004612af4565b611bb2565b6103fe611cbd565b6103fe600d5481565b6102c561070c366004612b5b565b611ccc565b6007546104499073ffffffffffffffffffffffffffffffffffffffff1681565b6102c5611ec3565b6102c5610747366004612be3565b611ecd565b6102c561075a366004612ac0565b61208b565b61041961076d366004612c2e565b600860209081526000928352604080842090915290825290205460ff1681565b600b546104499073ffffffffffffffffffffffffffffffffffffffff1681565b6104497f000000000000000000000000000000000000000000000000000000000000000081565b6102c56107e2366004612c61565b6121d0565b6104196124ad565b6103fe6107fd366004612adb565b60009081526001602052604090206002015490565b610419610820366004612adb565b60056020526000908152604090205460ff1681565b60065473ffffffffffffffffffffffffffffffffffffffff163314610886576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60065473ffffffffffffffffffffffffffffffffffffffff163314610935576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610982576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46009805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b610a4a336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b610a80576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831617905560008054815260016020526040902054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115610b30576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f9912e2a4535169ea3ec6c9138afab89a1ba028d9534726bbedd154a25f11392c90600090a250565b6000610b8282600054611bb2565b92915050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610bd9576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065473ffffffffffffffffffffffffffffffffffffffff163303610c2a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600754604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600780547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600a80549091169055565b60008181526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115610d1f576040517fbf009dab000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b80546fffffffffffffffffffffffffffffffff16600003610d6c576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260036020908152604080832085845290915290205460ff1615610dc1576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260026020908152604080832085845290915281205490819003610e16576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600360209081526040808320868452909152812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155600284015490840154610e7191849184612588565b3360008181526004602090815260408083208984529091529020829055909150610ed3907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690836125cf565b604080518581526020810184905290810182905233907f45c072aa05b9853b5a993de7a28bc332ee01404a628cec1a23ce0f659f842ef19060600160405180910390a250505050565b905090565b600080548152600160205260409020610f3990612650565b610f6f576040517f65ca8f5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610fa9576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b54610fee9073ffffffffffffffffffffffffffffffffffffffff16337f0000000000000000000000000000000000000000000000000000000000000000846126a0565b60008054338252600260209081526040808420838552909152822080549192849261101a908490612cb3565b909155505060008181526001602081905260408220908101805491928592611043908490612cb3565b9091555050604080518381526020810185905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a2505050565b6110b6336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b6110ec576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611139576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054815260016020526040902054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611156111a9576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f24e72a08217d19828f258be09f53f19295e0b24dbd7d8f168403e54e88af5bc9906020015b60405180910390a150565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015906112945750611292336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b155b156112cb576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600d60008282546112dd9190612cb3565b9091555050604080518281524260208201527f1e215fdd40f0b4854c5a2b2cfe53859ca232f085a5b129c9f65b6bfeb094c5e49101611218565b600c5473ffffffffffffffffffffffffffffffffffffffff16158015906113565750600c5473ffffffffffffffffffffffffffffffffffffffff163314155b1561138d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054808252600160205260409091208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115611400576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e821580159061145e575080548254429161144a9163ffffffff9091169070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612cc6565b6fffffffffffffffffffffffffffffffff16115b15611495576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805468010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff166000036114f6576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114fe6126e6565b600d805460009182905590611514856001612cb3565b6000819055835490915068010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff16821015611580576040517fd1c6fee000000000000000000000000000000000000000000000000000000000815260048101839052602401610d16565b60008181526001602052604081206002810184905584549091906115b290640100000000900463ffffffff1642612cc6565b82547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8216178355905060006115fd62093a8083612cc6565b83546fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000008383169081029190911786556040805188815292861660208401528201526060810187905290915033907f2f0e07e2baf6351377b2a46b5ccf5cd22b494921f870da223157659e174918f99060800160405180910390a25050505050505050565b600954610100900473ffffffffffffffffffffffffffffffffffffffff1633146116dc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075473ffffffffffffffffffffffffffffffffffffffff16330361172d576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600654604051339173ffffffffffffffffffffffffffffffffffffffff16907ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e090600090a3600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600980547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b6117f4336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b61182a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611877576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036118b1576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611991578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968360405161196391815260200190565b60405180910390a361198c73ffffffffffffffffffffffffffffffffffffffff841683836125cf565b505050565b600080548082526001602052604082208054919290916fffffffffffffffffffffffffffffffff1690036119f1576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119fa81612650565b15611a31576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611611a92576040517fa0e9298400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600281015480841115611af0576040517fb2b3b53b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716600482015260248101859052604401610d16565b6000838152600160208181526040808420848155928301849055600290920192909255600d80548785030190555185815273ffffffffffffffffffffffffffffffffffffffff88811692908816917f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f9096910160405180910390a3611baa73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001686866125cf565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020908152604080832084845290915281205460ff1615611bf357506000610b82565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600260209081526040808320858452909152902054801580611c32575060005483115b15611c41576000915050610b82565b6000838152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff8082168352700100000000000000000000000000000000909104169381019390935292830154908201819052600290920154606082018190529092611cb492859291612588565b95945050505050565b60008054610f1c906001612cb3565b611cfa336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b611d30576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611d7d576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b82811015611baa57848482818110611db057611db0612cee565b905060400201803603810190611dc69190612d1d565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260088352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101611d96565b611ecb6126e6565b565b611efb336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b611f31576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f416040820160208301612db5565b63ffffffff161580611f7a5750611f5e6060820160408301612df8565b77ffffffffffffffffffffffffffffffffffffffffffffffff16155b80611f955750611f8d6020820182612db5565b63ffffffff16155b15611fcc576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080548082526001602052604090912054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff16111561203e576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600e61204b8282612e15565b9050507f0ae1772a552aa48ab7e8bf58c335b3d4ce981b3d6c928f90d69a58f0f28d75fe818360405161207f929190612eda565b60405180910390a15050565b6120b9336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b6120ef576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661213c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5460075460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6121fe336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b612234576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612281576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000548211156122bd576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604090205460ff1615612306576040517f3e49310000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612376576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154156123b2576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556002820154905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811691908516907f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90969061245e9085815260200190565b60405180910390a36124a773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001684836125cf565b50505050565b600080548152600160205260408120610f1c90612650565b60095460009060ff16156124f7575060065473ffffffffffffffffffffffffffffffffffffffff838116911614610b82565b60075473ffffffffffffffffffffffffffffffffffffffff84811691161480612572575073ffffffffffffffffffffffffffffffffffffffff831660009081526008602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b1561257f57506001610b82565b50600092915050565b6000612595858585612762565b90508180156125b45750600083806125af576125af612f4a565b858709115b156125c7576125c4600182612cb3565b90505b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261198c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612873565b8054600090426fffffffffffffffffffffffffffffffff90911611801590610b825750505470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16421090565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526124a79186918216906323b872dd90608401612609565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631249c58b6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561274e57600080fd5b505af11580156124a7573d6000803e3d6000fd5b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036127ba578382816127b0576127b0612f4a565b049250505061286c565b838110612804576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401610d16565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b600061289573ffffffffffffffffffffffffffffffffffffffff841683612909565b905080516000141580156128ba5750808060200190518101906128b89190612f79565b155b1561198c576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610d16565b606061286c83836000846000808573ffffffffffffffffffffffffffffffffffffffff16848660405161293c9190612f96565b60006040518083038185875af1925050503d8060008114612979576040519150601f19603f3d011682016040523d82523d6000602084013e61297e565b606091505b509150915061298e868383612998565b9695505050505050565b6060826129ad576129a882612a27565b61286c565b81511580156129d1575073ffffffffffffffffffffffffffffffffffffffff84163b155b15612a20576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d16565b508061286c565b805115612a375780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b8015158114612a6957600080fd5b600060208284031215612a8c57600080fd5b813561286c81612a6c565b803573ffffffffffffffffffffffffffffffffffffffff81168114612abb57600080fd5b919050565b600060208284031215612ad257600080fd5b61286c82612a97565b600060208284031215612aed57600080fd5b5035919050565b60008060408385031215612b0757600080fd5b612b1083612a97565b946020939093013593505050565b600080600060608486031215612b3357600080fd5b612b3c84612a97565b9250612b4a60208501612a97565b929592945050506040919091013590565b600080600060408486031215612b7057600080fd5b612b7984612a97565b9250602084013567ffffffffffffffff811115612b9557600080fd5b8401601f81018613612ba657600080fd5b803567ffffffffffffffff811115612bbd57600080fd5b8660208260061b8401011115612bd257600080fd5b939660209190910195509293505050565b60006060828403128015612bf657600080fd5b509092915050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114612abb57600080fd5b60008060408385031215612c4157600080fd5b612c4a83612a97565b9150612c5860208401612bfe565b90509250929050565b60008060408385031215612c7457600080fd5b82359150612c5860208401612a97565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610b8257610b82612c84565b6fffffffffffffffffffffffffffffffff8181168382160190811115610b8257610b82612c84565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006040828403128015612d3057600080fd5b506040805190810167ffffffffffffffff81118282101715612d7b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052612d8783612bfe565b81526020830135612d9781612a6c565b60208201529392505050565b63ffffffff81168114612a6957600080fd5b600060208284031215612dc757600080fd5b813561286c81612da3565b77ffffffffffffffffffffffffffffffffffffffffffffffff81168114612a6957600080fd5b600060208284031215612e0a57600080fd5b813561286c81612dd2565b8135612e2081612da3565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135612e6081612da3565b67ffffffff000000008160201b16905080837fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000084161717845560408501359150612ea982612dd2565b90911760409190911b7fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001617905550565b828152608081018235612eec81612da3565b63ffffffff81166020840152506020830135612f0781612da3565b63ffffffff81166040840152506040830135612f2281612dd2565b77ffffffffffffffffffffffffffffffffffffffffffffffff81166060840152509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600060208284031215612f8b57600080fd5b815161286c81612a6c565b6000825160005b81811015612fb75760208186018101518583015201612f9d565b50600092019182525091905056fea2646970667358221220f04074cfc1c336c5b34bf043ca300f3519398aac60ec08f02ec5e7f842a2de9e64736f6c634300081c0033",
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c8063766718081161017b578063ccb51004116100d8578063e110dfda1161008c578063e78a587511610071578063e78a5875146107e7578063f0234008146107ef578063f3ed8f251461081257600080fd5b8063e110dfda146107ad578063e36977cc146107d457600080fd5b8063d9a349c1116100bd578063d9a349c11461074c578063daeccc791461075f578063dfafd4fd1461078d57600080fd5b8063ccb5100414610731578063d2fbb3cb1461073957600080fd5b8063ab1b71bd1161012f578063b3ba0e2b11610114578063b3ba0e2b146106f5578063bfccf0ec146106fe578063c34c08e51461071157600080fd5b8063ab1b71bd146106da578063aea0e78b146106ed57600080fd5b80638503ae3d116101605780638503ae3d146105e7578063a271e525146106a4578063a7229fd9146106c757600080fd5b806376671808146105d75780638112c4af146105df57600080fd5b806338a6318311610229578063501ee126116101dd57806361d027b3116101c257806361d027b314610595578063654f2fc8146105bc5780636b64c769146105cf57600080fd5b8063501ee1261461055757806355b4b1a41461056a57600080fd5b8063454a2ab31161020e578063454a2ab3146104eb578063466c01b8146104fe5780634dd6c8de1461052957600080fd5b806338a6318314610489578063396939f2146104a957600080fd5b806314e21ecf116102805780631a7d73d0116102655780631a7d73d0146104295780631f2114051461046e578063379607f51461047657600080fd5b806314e21ecf146103eb5780631810fe7f1461040c57600080fd5b8063032ef901146102b257806307f184f1146102c7578063128e771b146102da578063135022c2146102ed575b600080fd5b6102c56102c0366004612a7a565b610835565b005b6102c56102d5366004612ac0565b6108e4565b6102c56102e8366004612ac0565b610a1c565b6103866102fb366004612adb565b60408051608081018252600080825260208201819052918101829052606081019190915250600090815260016020818152604092839020835160808101855281546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041692810192909252918201549281019290925260020154606082015290565b6040516103e2919060006080820190506fffffffffffffffffffffffffffffffff83511682526fffffffffffffffffffffffffffffffff6020840151166020830152604083015160408301526060830151606083015292915050565b60405180910390f35b6103fe6103f9366004612ac0565b610b74565b6040519081526020016103e2565b6009546104199060ff1681565b60405190151581526020016103e2565b600c546104499073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103e2565b6102c5610b88565b6102c5610484366004612adb565b610ca7565b6006546104499073ffffffffffffffffffffffffffffffffffffffff1681565b61041960008054815260016020526040812054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115905090565b6102c56104f9366004612adb565b610f21565b6103fe61050c366004612af4565b600260209081526000928352604080842090915290825290205481565b610419610537366004612af4565b600360209081526000928352604080842090915290825290205460ff1681565b6102c5610565366004612ac0565b611088565b6103fe610578366004612af4565b600460209081526000928352604080842090915290825290205481565b6104497f000000000000000000000000000000000000000000000000000000000000000081565b6102c56105ca366004612adb565b611223565b6102c5611317565b6000546103fe565b6102c5611686565b61065d60408051606081018252600080825260208201819052918101919091525060408051606081018252600e5463ffffffff8082168352640100000000820416602083015268010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff169181019190915290565b60408051825163ffffffff9081168252602080850151909116908201529181015177ffffffffffffffffffffffffffffffffffffffffffffffff16908201526060016103e2565b6106ae62093a8081565b60405167ffffffffffffffff90911681526020016103e2565b6102c56106d5366004612b1e565b6117c6565b6103fe6106e8366004612af4565b611bb2565b6103fe611cbd565b6103fe600d5481565b6102c561070c366004612b5b565b611ccc565b6007546104499073ffffffffffffffffffffffffffffffffffffffff1681565b6102c5611ec3565b6102c5610747366004612be3565b611ecd565b6102c561075a366004612ac0565b61208b565b61041961076d366004612c2e565b600860209081526000928352604080842090915290825290205460ff1681565b600b546104499073ffffffffffffffffffffffffffffffffffffffff1681565b6104497f000000000000000000000000000000000000000000000000000000000000000081565b6102c56107e2366004612c61565b6121d0565b6104196124ad565b6103fe6107fd366004612adb565b60009081526001602052604090206002015490565b610419610820366004612adb565b60056020526000908152604090205460ff1681565b60065473ffffffffffffffffffffffffffffffffffffffff163314610886576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60065473ffffffffffffffffffffffffffffffffffffffff163314610935576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610982576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46009805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b610a4a336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b610a80576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831617905560008054815260016020526040902054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115610b30576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8216907f9912e2a4535169ea3ec6c9138afab89a1ba028d9534726bbedd154a25f11392c90600090a250565b6000610b8282600054611bb2565b92915050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610bd9576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065473ffffffffffffffffffffffffffffffffffffffff163303610c2a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600754604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600780547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600a80549091169055565b60008181526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115610d1f576040517fbf009dab000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b80546fffffffffffffffffffffffffffffffff16600003610d6c576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260036020908152604080832085845290915290205460ff1615610dc1576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260026020908152604080832085845290915281205490819003610e16576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600360209081526040808320868452909152812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155600284015490840154610e7191849184612588565b3360008181526004602090815260408083208984529091529020829055909150610ed3907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690836125cf565b604080518581526020810184905290810182905233907f45c072aa05b9853b5a993de7a28bc332ee01404a628cec1a23ce0f659f842ef19060600160405180910390a250505050565b905090565b600080548152600160205260409020610f3990612650565b610f6f576040517f65ca8f5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003610fa9576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b54610fee9073ffffffffffffffffffffffffffffffffffffffff16337f0000000000000000000000000000000000000000000000000000000000000000846126a0565b60008054338252600260209081526040808420838552909152822080549192849261101a908490612cb3565b909155505060008181526001602081905260408220908101805491928592611043908490612cb3565b9091555050604080518381526020810185905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a2505050565b6110b6336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b6110ec576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611139576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054815260016020526040902054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611156111a9576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f24e72a08217d19828f258be09f53f19295e0b24dbd7d8f168403e54e88af5bc9906020015b60405180910390a150565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015906112945750611292336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b155b156112cb576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600d60008282546112dd9190612cb3565b9091555050604080518281524260208201527f1e215fdd40f0b4854c5a2b2cfe53859ca232f085a5b129c9f65b6bfeb094c5e49101611218565b600c5473ffffffffffffffffffffffffffffffffffffffff16158015906113565750600c5473ffffffffffffffffffffffffffffffffffffffff163314155b1561138d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054808252600160205260409091208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115611400576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e821580159061145e575080548254429161144a9163ffffffff9091169070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612cc6565b6fffffffffffffffffffffffffffffffff16115b15611495576040517ffcd189b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805468010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff166000036114f6576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114fe6126e6565b600d805460009182905590611514856001612cb3565b6000819055835490915068010000000000000000900477ffffffffffffffffffffffffffffffffffffffffffffffff16821015611580576040517fd1c6fee000000000000000000000000000000000000000000000000000000000815260048101839052602401610d16565b60008181526001602052604081206002810184905584549091906115b290640100000000900463ffffffff1642612cc6565b82547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8216178355905060006115fd62093a8083612cc6565b83546fffffffffffffffffffffffffffffffff9081167001000000000000000000000000000000008383169081029190911786556040805188815292861660208401528201526060810187905290915033907f2f0e07e2baf6351377b2a46b5ccf5cd22b494921f870da223157659e174918f99060800160405180910390a25050505050505050565b600954610100900473ffffffffffffffffffffffffffffffffffffffff1633146116dc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075473ffffffffffffffffffffffffffffffffffffffff16330361172d576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600654604051339173ffffffffffffffffffffffffffffffffffffffff16907ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e090600090a3600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600980547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b6117f4336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b61182a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611877576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036118b1576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611991578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90968360405161196391815260200190565b60405180910390a361198c73ffffffffffffffffffffffffffffffffffffffff841683836125cf565b505050565b600080548082526001602052604082208054919290916fffffffffffffffffffffffffffffffff1690036119f1576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119fa81612650565b15611a31576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1611611a92576040517fa0e9298400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600281015480841115611af0576040517fb2b3b53b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716600482015260248101859052604401610d16565b6000838152600160208181526040808420848155928301849055600290920192909255600d80548785030190555185815273ffffffffffffffffffffffffffffffffffffffff88811692908816917f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f9096910160405180910390a3611baa73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001686866125cf565b505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020908152604080832084845290915281205460ff1615611bf357506000610b82565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600260209081526040808320858452909152902054801580611c32575060005483115b15611c41576000915050610b82565b6000838152600160208181526040808420815160808101835281546fffffffffffffffffffffffffffffffff8082168352700100000000000000000000000000000000909104169381019390935292830154908201819052600290920154606082018190529092611cb492859291612588565b95945050505050565b60008054610f1c906001612cb3565b611cfa336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b611d30576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611d7d576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b82811015611baa57848482818110611db057611db0612cee565b905060400201803603810190611dc69190612d1d565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260088352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101611d96565b611ecb6126e6565b565b611efb336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b611f31576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f416040820160208301612db5565b63ffffffff161580611f7a5750611f5e6060820160408301612df8565b77ffffffffffffffffffffffffffffffffffffffffffffffff16155b80611f955750611f8d6020820182612db5565b63ffffffff16155b15611fcc576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080548082526001602052604090912054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff16111561203e576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600e61204b8282612e15565b9050507f0ae1772a552aa48ab7e8bf58c335b3d4ce981b3d6c928f90d69a58f0f28d75fe818360405161207f929190612eda565b60405180910390a15050565b6120b9336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b6120ef576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661213c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5460075460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6121fe336000357fffffffff00000000000000000000000000000000000000000000000000000000166124c5565b612234576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612281576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000548211156122bd576040517fd5b25b6300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602052604090205460ff1615612306576040517f3e49310000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526001602052604090208054427001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff161115612376576040517fb37f700600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001810154156123b2576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556002820154905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811691908516907f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f90969061245e9085815260200190565b60405180910390a36124a773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001684836125cf565b50505050565b600080548152600160205260408120610f1c90612650565b60095460009060ff16156124f7575060065473ffffffffffffffffffffffffffffffffffffffff838116911614610b82565b60075473ffffffffffffffffffffffffffffffffffffffff84811691161480612572575073ffffffffffffffffffffffffffffffffffffffff831660009081526008602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b1561257f57506001610b82565b50600092915050565b6000612595858585612762565b90508180156125b45750600083806125af576125af612f4a565b858709115b156125c7576125c4600182612cb3565b90505b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261198c91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612873565b8054600090426fffffffffffffffffffffffffffffffff90911611801590610b825750505470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16421090565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526124a79186918216906323b872dd90608401612609565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631249c58b6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561274e57600080fd5b505af11580156124a7573d6000803e3d6000fd5b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036127ba578382816127b0576127b0612f4a565b049250505061286c565b838110612804576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401610d16565b600084868809851960019081018716968790049682860381900495909211909303600082900391909104909201919091029190911760038402600290811880860282030280860282030280860282030280860282030280860282030280860290910302029150505b9392505050565b600061289573ffffffffffffffffffffffffffffffffffffffff841683612909565b905080516000141580156128ba5750808060200190518101906128b89190612f79565b155b1561198c576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610d16565b606061286c83836000846000808573ffffffffffffffffffffffffffffffffffffffff16848660405161293c9190612f96565b60006040518083038185875af1925050503d8060008114612979576040519150601f19603f3d011682016040523d82523d6000602084013e61297e565b606091505b509150915061298e868383612998565b9695505050505050565b6060826129ad576129a882612a27565b61286c565b81511580156129d1575073ffffffffffffffffffffffffffffffffffffffff84163b155b15612a20576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610d16565b508061286c565b805115612a375780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b8015158114612a6957600080fd5b600060208284031215612a8c57600080fd5b813561286c81612a6c565b803573ffffffffffffffffffffffffffffffffffffffff81168114612abb57600080fd5b919050565b600060208284031215612ad257600080fd5b61286c82612a97565b600060208284031215612aed57600080fd5b5035919050565b60008060408385031215612b0757600080fd5b612b1083612a97565b946020939093013593505050565b600080600060608486031215612b3357600080fd5b612b3c84612a97565b9250612b4a60208501612a97565b929592945050506040919091013590565b600080600060408486031215612b7057600080fd5b612b7984612a97565b9250602084013567ffffffffffffffff811115612b9557600080fd5b8401601f81018613612ba657600080fd5b803567ffffffffffffffff811115612bbd57600080fd5b8660208260061b8401011115612bd257600080fd5b939660209190910195509293505050565b60006060828403128015612bf657600080fd5b509092915050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114612abb57600080fd5b60008060408385031215612c4157600080fd5b612c4a83612a97565b9150612c5860208401612bfe565b90509250929050565b60008060408385031215612c7457600080fd5b82359150612c5860208401612a97565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610b8257610b82612c84565b6fffffffffffffffffffffffffffffffff8181168382160190811115610b8257610b82612c84565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006040828403128015612d3057600080fd5b506040805190810167ffffffffffffffff81118282101715612d7b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052612d8783612bfe565b81526020830135612d9781612a6c565b60208201529392505050565b63ffffffff81168114612a6957600080fd5b600060208284031215612dc757600080fd5b813561286c81612da3565b77ffffffffffffffffffffffffffffffffffffffffffffffff81168114612a6957600080fd5b600060208284031215612e0a57600080fd5b813561286c81612dd2565b8135612e2081612da3565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135612e6081612da3565b67ffffffff000000008160201b16905080837fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000084161717845560408501359150612ea982612dd2565b90911760409190911b7fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001617905550565b828152608081018235612eec81612da3565b63ffffffff81166020840152506020830135612f0781612da3565b63ffffffff81166040840152506040830135612f2281612dd2565b77ffffffffffffffffffffffffffffffffffffffffffffffff81166060840152509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600060208284031215612f8b57600080fd5b815161286c81612a6c565b6000825160005b81811015612fb75760208186018101518583015201612f9d565b50600092019182525091905056fea2646970667358221220f04074cfc1c336c5b34bf043ca300f3519398aac60ec08f02ec5e7f842a2de9e64736f6c634300081c0033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/TempleGold.sol/TempleGold.json b/apps/dapp/abi/contracts/templegold/TempleGold.sol/TempleGold.json
new file mode 100644
index 000000000..e34e3f7d6
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/TempleGold.sol/TempleGold.json
@@ -0,0 +1,2240 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "TempleGold",
+ "sourceName": "contracts/templegold/TempleGold.sol",
+ "abi": [
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "executor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "layerZeroEndpoint",
+ "type": "address"
+ },
+ {
+ "internalType": "uint128",
+ "name": "mintChainId",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint128",
+ "name": "mintChainLzEid",
+ "type": "uint128"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct ITempleGold.InitArgs",
+ "name": "_initArgs",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "target",
+ "type": "address"
+ }
+ ],
+ "name": "AddressEmptyCode",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "AddressInsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotCompose",
+ "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": [],
+ "name": "ExpectedNonZero",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "FailedInnerCall",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAddress",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidDelegate",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidEndpointCall",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidLocalDecimals",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes",
+ "name": "options",
+ "type": "bytes"
+ }
+ ],
+ "name": "InvalidOptions",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidParam",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidTotalShare",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "LzTokenUnavailable",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "MissingParameter",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ }
+ ],
+ "name": "NoPeer",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ }
+ ],
+ "name": "NonTransferrable",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "msgValue",
+ "type": "uint256"
+ }
+ ],
+ "name": "NotEnoughNative",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "name": "OnlyEndpoint",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ }
+ ],
+ "name": "OnlyPeer",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "OnlySelf",
+ "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": "uint256",
+ "name": "x",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "y",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "denominator",
+ "type": "uint256"
+ }
+ ],
+ "name": "PRBMath_MulDiv_Overflow",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "SafeERC20FailedOperation",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes",
+ "name": "result",
+ "type": "bytes"
+ }
+ ],
+ "name": "SimulationResult",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amountLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "minAmountLD",
+ "type": "uint256"
+ }
+ ],
+ "name": "SlippageExceeded",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "WrongChain",
+ "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": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "sender",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "circulatingSuppply",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "totalBurned",
+ "type": "uint256"
+ }
+ ],
+ "name": "CirculatingSupplyUpdated",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "_contract",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "bool",
+ "name": "_whitelisted",
+ "type": "bool"
+ }
+ ],
+ "name": "ContractAuthorizationSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "stakingAmount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auctionAmount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "gnosisAmount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "timestamp",
+ "type": "uint256"
+ }
+ ],
+ "name": "Distributed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "staking",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "auction",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "gnosis",
+ "type": "uint256"
+ }
+ ],
+ "name": "DistributionParamsSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint16",
+ "name": "msgType",
+ "type": "uint16"
+ },
+ {
+ "internalType": "bytes",
+ "name": "options",
+ "type": "bytes"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct EnforcedOptionParam[]",
+ "name": "_enforcedOptions",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "EnforcedOptionSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "inspector",
+ "type": "address"
+ }
+ ],
+ "name": "MsgInspectorSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "guid",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "toAddress",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amountReceivedLD",
+ "type": "uint256"
+ }
+ ],
+ "name": "OFTReceived",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "guid",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint32",
+ "name": "dstEid",
+ "type": "uint32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "fromAddress",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amountSentLD",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amountReceivedLD",
+ "type": "uint256"
+ }
+ ],
+ "name": "OFTSent",
+ "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": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "peer",
+ "type": "bytes32"
+ }
+ ],
+ "name": "PeerSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "preCrimeAddress",
+ "type": "address"
+ }
+ ],
+ "name": "PreCrimeSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "auction",
+ "type": "address"
+ }
+ ],
+ "name": "StableGoldAuctionSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "staking",
+ "type": "address"
+ }
+ ],
+ "name": "StakingSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "gnosis",
+ "type": "address"
+ }
+ ],
+ "name": "TeamGnosisSet",
+ "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": "uint128",
+ "name": "numerator",
+ "type": "uint128"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint128",
+ "name": "denominator",
+ "type": "uint128"
+ }
+ ],
+ "name": "VestingFactorSet",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "DISTRIBUTION_DIVISOR",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "MAX_CIRCULATING_SUPPLY",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "MINIMUM_MINT",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "SEND",
+ "outputs": [
+ {
+ "internalType": "uint16",
+ "name": "",
+ "type": "uint16"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "SEND_AND_CALL",
+ "outputs": [
+ {
+ "internalType": "uint16",
+ "name": "",
+ "type": "uint16"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct Origin",
+ "name": "origin",
+ "type": "tuple"
+ }
+ ],
+ "name": "allowInitializePath",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "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": [],
+ "name": "approvalRequired",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "pure",
+ "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": [],
+ "name": "auction",
+ "outputs": [
+ {
+ "internalType": "contract IStableGoldAuction",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_contract",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "_whitelist",
+ "type": "bool"
+ }
+ ],
+ "name": "authorizeContract",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "authorized",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "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": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "burn",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "canDistribute",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "circulatingSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint16",
+ "name": "_msgType",
+ "type": "uint16"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_extraOptions",
+ "type": "bytes"
+ }
+ ],
+ "name": "combineOptions",
+ "outputs": [
+ {
+ "internalType": "bytes",
+ "name": "",
+ "type": "bytes"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "decimalConversionRate",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "decimals",
+ "outputs": [
+ {
+ "internalType": "uint8",
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "endpoint",
+ "outputs": [
+ {
+ "internalType": "contract ILayerZeroEndpointV2",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint16",
+ "name": "msgType",
+ "type": "uint16"
+ }
+ ],
+ "name": "enforcedOptions",
+ "outputs": [
+ {
+ "internalType": "bytes",
+ "name": "enforcedOption",
+ "type": "bytes"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getDistributionParameters",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "staking",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "auction",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gnosis",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct ITempleGold.DistributionParams",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getMintAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getVestingFactor",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "value",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint128",
+ "name": "weekMultiplier",
+ "type": "uint128"
+ }
+ ],
+ "internalType": "struct ITempleGold.VestingFactor",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct Origin",
+ "name": "",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes",
+ "name": "",
+ "type": "bytes"
+ },
+ {
+ "internalType": "address",
+ "name": "_sender",
+ "type": "address"
+ }
+ ],
+ "name": "isComposeMsgSender",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "_peer",
+ "type": "bytes32"
+ }
+ ],
+ "name": "isPeer",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "lastMintTimestamp",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct Origin",
+ "name": "_origin",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "_guid",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_message",
+ "type": "bytes"
+ },
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_extraData",
+ "type": "bytes"
+ }
+ ],
+ "name": "lzReceive",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct Origin",
+ "name": "origin",
+ "type": "tuple"
+ },
+ {
+ "internalType": "uint32",
+ "name": "dstEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "receiver",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "guid",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "executor",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "message",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "extraData",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct InboundPacket[]",
+ "name": "_packets",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "lzReceiveAndRevert",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct Origin",
+ "name": "_origin",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "_guid",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_message",
+ "type": "bytes"
+ },
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_extraData",
+ "type": "bytes"
+ }
+ ],
+ "name": "lzReceiveSimulate",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "mint",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "msgInspector",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "name": "nextNonce",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "oApp",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "oAppVersion",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "senderVersion",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "receiverVersion",
+ "type": "uint64"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "oftVersion",
+ "outputs": [
+ {
+ "internalType": "bytes4",
+ "name": "interfaceId",
+ "type": "bytes4"
+ },
+ {
+ "internalType": "uint64",
+ "name": "version",
+ "type": "uint64"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ }
+ ],
+ "name": "peers",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "peer",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "preCrime",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "dstEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "to",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amountLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "minAmountLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "extraOptions",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "composeMsg",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "oftCmd",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct SendParam",
+ "name": "_sendParam",
+ "type": "tuple"
+ }
+ ],
+ "name": "quoteOFT",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "minAmountLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "maxAmountLD",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct OFTLimit",
+ "name": "oftLimit",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "int256",
+ "name": "feeAmountLD",
+ "type": "int256"
+ },
+ {
+ "internalType": "string",
+ "name": "description",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct OFTFeeDetail[]",
+ "name": "oftFeeDetails",
+ "type": "tuple[]"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "amountSentLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amountReceivedLD",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct OFTReceipt",
+ "name": "oftReceipt",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "dstEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "to",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amountLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "minAmountLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "extraOptions",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "composeMsg",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "oftCmd",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct SendParam",
+ "name": "_sendParam",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bool",
+ "name": "_payInLzToken",
+ "type": "bool"
+ }
+ ],
+ "name": "quoteSend",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "nativeFee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lzTokenFee",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct MessagingFee",
+ "name": "msgFee",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "dstEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "to",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amountLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "minAmountLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "extraOptions",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "composeMsg",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "oftCmd",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct SendParam",
+ "name": "_sendParam",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "nativeFee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lzTokenFee",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct MessagingFee",
+ "name": "_fee",
+ "type": "tuple"
+ },
+ {
+ "internalType": "address",
+ "name": "_refundAddress",
+ "type": "address"
+ }
+ ],
+ "name": "send",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "guid",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "nativeFee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lzTokenFee",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct MessagingFee",
+ "name": "fee",
+ "type": "tuple"
+ }
+ ],
+ "internalType": "struct MessagingReceipt",
+ "name": "msgReceipt",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "amountSentLD",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amountReceivedLD",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct OFTReceipt",
+ "name": "oftReceipt",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_delegate",
+ "type": "address"
+ }
+ ],
+ "name": "setDelegate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "staking",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "auction",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gnosis",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct ITempleGold.DistributionParams",
+ "name": "_params",
+ "type": "tuple"
+ }
+ ],
+ "name": "setDistributionParams",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint16",
+ "name": "msgType",
+ "type": "uint16"
+ },
+ {
+ "internalType": "bytes",
+ "name": "options",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct EnforcedOptionParam[]",
+ "name": "_enforcedOptions",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setEnforcedOptions",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_msgInspector",
+ "type": "address"
+ }
+ ],
+ "name": "setMsgInspector",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "_peer",
+ "type": "bytes32"
+ }
+ ],
+ "name": "setPeer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_preCrime",
+ "type": "address"
+ }
+ ],
+ "name": "setPreCrime",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_auction",
+ "type": "address"
+ }
+ ],
+ "name": "setStableGoldAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_staking",
+ "type": "address"
+ }
+ ],
+ "name": "setStaking",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_gnosis",
+ "type": "address"
+ }
+ ],
+ "name": "setTeamGnosis",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "value",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint128",
+ "name": "weekMultiplier",
+ "type": "uint128"
+ }
+ ],
+ "internalType": "struct ITempleGold.VestingFactor",
+ "name": "_factor",
+ "type": "tuple"
+ }
+ ],
+ "name": "setVestingFactor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "sharedDecimals",
+ "outputs": [
+ {
+ "internalType": "uint8",
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "staking",
+ "outputs": [
+ {
+ "internalType": "contract ITempleGoldStaking",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "teamGnosis",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "token",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "totalDistributed",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "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"
+ }
+ ],
+ "bytecode": "0x61010060405234801561001157600080fd5b5060405161571738038061571783398101604081905261003091610326565b608081015160a08201516020830151835183836012848481818181806001600160a01b03811661007a57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b610083816101ab565b506001600160a01b0380831660805281166100b157604051632d618d8160e21b815260040160405180910390fd5b60805160405163ca5eb5e160e01b81526001600160a01b0383811660048301529091169063ca5eb5e190602401600060405180830381600087803b1580156100f857600080fd5b505af115801561010c573d6000803e3d6000fd5b50505050505050506101226101fb60201b60201c565b60ff168360ff161015610148576040516301e9714b60e41b815260040160405180910390fd5b61015360068461041a565b61015e90600a610520565b60a0525060089150610172905083826105bf565b50600961017f82826105bf565b50505060408501516001600160801b0390811660c05260609095015190941660e0525061067d92505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600690565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b038111828210171561023857610238610200565b60405290565b604051601f8201601f191681016001600160401b038111828210171561026657610266610200565b604052919050565b80516001600160a01b038116811461028557600080fd5b919050565b80516001600160801b038116811461028557600080fd5b600082601f8301126102b257600080fd5b81516001600160401b038111156102cb576102cb610200565b6102de601f8201601f191660200161023e565b8181528460208386010111156102f357600080fd5b60005b82811015610312576020818601810151838301820152016102f6565b506000918101602001919091529392505050565b60006020828403121561033857600080fd5b81516001600160401b0381111561034e57600080fd5b820160c0818503121561036057600080fd5b610368610216565b6103718261026e565b815261037f6020830161026e565b60208201526103906040830161028a565b60408201526103a16060830161028a565b606082015260808201516001600160401b038111156103bf57600080fd5b6103cb868285016102a1565b60808301525060a08201516001600160401b038111156103ea57600080fd5b6103f6868285016102a1565b60a083015250949350505050565b634e487b7160e01b600052601160045260246000fd5b60ff828116828216039081111561043357610433610404565b92915050565b6001815b60018411156104745780850481111561045857610458610404565b600184161561046657908102905b60019390931c92800261043d565b935093915050565b60008261048b57506001610433565b8161049857506000610433565b81600181146104ae57600281146104b8576104d4565b6001915050610433565b60ff8411156104c9576104c9610404565b50506001821b610433565b5060208310610133831016604e8410600b84101617156104f7575081810a610433565b6105046000198484610439565b806000190482111561051857610518610404565b029392505050565b600061052f60ff84168361047c565b9392505050565b600181811c9082168061054a57607f821691505b60208210810361056a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105ba57806000526020600020601f840160051c810160208510156105975750805b601f840160051c820191505b818110156105b757600081556001016105a3565b50505b505050565b81516001600160401b038111156105d8576105d8610200565b6105ec816105e68454610536565b84610570565b6020601f82116001811461062057600083156106085750848201515b600019600385901b1c1916600184901b1784556105b7565b600084815260208120601f198516915b828110156106505787850151825560209485019460019092019101610630565b508482101561066e5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60805160a05160c05160e051614ff861071f6000396000611e01015260008181610ebb01528181611116015281816112ba015281816115c0015281816116f30152818161183501526120940152600081816109b10152818161332e0152818161343b01526135a301526000818161072501528181610fe90152818161202b01528181612d0a015281816130e60152818161369f01526137980152614ff86000f3fe6080604052600436106103c35760003560e01c80638da5cb5b116101f2578063b98bd0701161010d578063d4243885116100a0578063efca2eed1161006f578063efca2eed14610ce6578063f2fde38b14610cfb578063fc0c546a14610689578063ff7bd03d14610d1b57600080fd5b8063d424388514610be8578063d677947e14610c08578063dd62ed3e14610c1d578063e71cc65c14610c7057600080fd5b8063c7c7f5b3116100dc578063c7c7f5b314610b74578063ca5eb5e114610b95578063cb5cf37014610bb5578063d045a0dc14610bd557600080fd5b8063b98bd07014610af4578063bb0b6a5314610b14578063bc70b35414610b41578063bd815db014610b6157600080fd5b80639f335d9a11610185578063a9059cbb11610154578063a9059cbb14610a5a578063b731ea0a14610a7a578063b7de9ad614610aa7578063b918161114610ac457600080fd5b80639f335d9a146109f35780639f68b96414610a11578063a1b85eba14610a25578063a8995deb14610a4557600080fd5b80639358928b116101c15780639358928b1461097557806395d89b411461098a578063963efcaa1461099f5780639dcb114c146109d357600080fd5b80638da5cb5b146108c05780638e80ff5d146108eb5780638f2419d3146109355780638ff390991461095557600080fd5b806342966c68116102e25780637027ecfb116102755780637d25a05e116102445780637d25a05e146108235780637d9f6db51461085f57806382413eac1461088c578063857749b0146108ac57600080fd5b80637027ecfb1461076757806370a082311461079e578063715018a6146107e15780637a962f4c146107f657600080fd5b80635a0dfe4d116102b15780635a0dfe4d146106bc5780635cbeb13f146106f35780635e280f11146107135780636fc1b31e1461074757600080fd5b806342966c681461063c5780634cf088d91461065c57806352ae2879146106895780635535d4611461069c57600080fd5b806317442b701161035a578063246080271161032957806324608027146105ad578063313ce567146105cd5780633400288b146105ef5780633b6f743b1461060f57600080fd5b806317442b701461053757806318160ddd146105595780631f5e13341461057857806323b872dd1461058d57600080fd5b80631249c58b116103965780631249c58b146104a457806313137d65146104bb578063134d4f25146104ce578063156a0d0f146104f657600080fd5b806306fdde03146103c8578063095ea7b3146103f35780630d35b41514610423578063111ecdad14610452575b600080fd5b3480156103d457600080fd5b506103dd610d3b565b6040516103ea9190613d8f565b60405180910390f35b3480156103ff57600080fd5b5061041361040e366004613dc4565b610dcd565b60405190151581526020016103ea565b34801561042f57600080fd5b5061044361043e366004613e08565b610de7565b6040516103ea93929190613e3d565b34801561045e57600080fd5b5060045461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103ea565b3480156104b057600080fd5b506104b9610eb9565b005b6104b96104c9366004613f53565b610fe7565b3480156104da57600080fd5b506104e3600281565b60405161ffff90911681526020016103ea565b34801561050257600080fd5b50604080517f02e49c2c00000000000000000000000000000000000000000000000000000000815260016020820152016103ea565b34801561054357600080fd5b50604080516001815260026020820152016103ea565b34801561056557600080fd5b506007545b6040519081526020016103ea565b34801561058457600080fd5b506104e3600181565b34801561059957600080fd5b506104136105a8366004613ff6565b6110e6565b3480156105b957600080fd5b506104b96105c8366004614037565b61110c565b3480156105d957600080fd5b5060125b60405160ff90911681526020016103ea565b3480156105fb57600080fd5b506104b961060a36600461406c565b61123b565b34801561061b57600080fd5b5061062f61062a366004614096565b611251565b6040516103ea91906140e8565b34801561064857600080fd5b506104b96106573660046140ff565b6112b8565b34801561066857600080fd5b50600a5461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561069557600080fd5b503061047f565b3480156106a857600080fd5b506103dd6106b736600461412a565b61133a565b3480156106c857600080fd5b506104136106d736600461406c565b63ffffffff919091166000908152600160205260409020541490565b3480156106ff57600080fd5b506104b961070e36600461415d565b6113df565b34801561071f57600080fd5b5061047f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561075357600080fd5b506104b961076236600461418b565b6114be565b34801561077357600080fd5b5061077c611539565b60408051825181526020808401519082015291810151908201526060016103ea565b3480156107aa57600080fd5b5061056a6107b936600461418b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b3480156107ed57600080fd5b506104b9611582565b34801561080257600080fd5b50600c5461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561082f57600080fd5b5061084661083e36600461406c565b600092915050565b60405167ffffffffffffffff90911681526020016103ea565b34801561086b57600080fd5b50600b5461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561089857600080fd5b506104136108a73660046141a8565b611594565b3480156108b857600080fd5b5060066105dd565b3480156108cc57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661047f565b3480156108f757600080fd5b50600c546109209074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016103ea565b34801561094157600080fd5b506104b961095036600461418b565b6115b6565b34801561096157600080fd5b506104b961097036600461418b565b6116e9565b34801561098157600080fd5b50600f5461056a565b34801561099657600080fd5b506103dd61181c565b3480156109ab57600080fd5b5061056a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156109df57600080fd5b5061056a6b033b2e3c9fd0803ce800000081565b3480156109ff57600080fd5b5061056a69021e19e0c9bab240000081565b348015610a1d57600080fd5b506000610413565b348015610a3157600080fd5b506104b9610a4036600461418b565b61182b565b348015610a5157600080fd5b5061056a61195e565b348015610a6657600080fd5b50610413610a75366004613dc4565b6119ae565b348015610a8657600080fd5b5060025461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b348015610ab357600080fd5b5061056a68056bc75e2d6310000081565b348015610ad057600080fd5b50610413610adf36600461418b565b60106020526000908152604090205460ff1681565b348015610b0057600080fd5b506104b9610b0f366004614254565b6119bc565b348015610b2057600080fd5b5061056a610b2f366004614296565b60016020526000908152604090205481565b348015610b4d57600080fd5b506103dd610b5c3660046142b1565b6119d6565b6104b9610b6f366004614254565b611b97565b610b87610b82366004614324565b611d65565b6040516103ea929190614387565b348015610ba157600080fd5b506104b9610bb036600461418b565b611fde565b348015610bc157600080fd5b506104b9610bd03660046143da565b61208a565b6104b9610be3366004613f53565b612271565b348015610bf457600080fd5b506104b9610c0336600461418b565b6122b9565b348015610c1457600080fd5b50610413612334565b348015610c2957600080fd5b5061056a610c383660046143f6565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260066020908152604080832093909416825291909152205490565b348015610c7c57600080fd5b506040805180820182526000808252602091820152815180830183526014546fffffffffffffffffffffffffffffffff80821680845270010000000000000000000000000000000090920481169284019283528451918252915190911691810191909152016103ea565b348015610cf257600080fd5b50600d5461056a565b348015610d0757600080fd5b506104b9610d1636600461418b565b61237e565b348015610d2757600080fd5b50610413610d36366004614037565b6123df565b606060088054610d4a90614424565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7690614424565b8015610dc35780601f10610d9857610100808354040283529160200191610dc3565b820191906000526020600020905b815481529060010190602001808311610da657829003601f168201915b5050505050905090565b600033610ddb818585612415565b60019150505b92915050565b60408051808201909152600080825260208201526060610e1a604051806040016040528060008152602001600081525090565b604080518082018252600080825267ffffffffffffffff602080840182905284518381529081019094529195509182610e76565b604080518082019091526000815260606020820152815260200190600190039081610e4e5790505b509350600080610e9b604089013560608a0135610e9660208c018c614296565b612422565b60408051808201909152918252602082015296989597505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff164614610f24576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526014546fffffffffffffffffffffffffffffffff808216808452700100000000000000000000000000000000909204166020830152601190600003610f71575050565b6000610f7c8361247f565b9050610f8781612553565b610f9057505050565b600c80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000004263ffffffff1602179055610fe1828261259b565b5050505b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16331461105d576040517f91ac5e4f0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6020870180359061107790611072908a614296565b6127f3565b146110ce576110896020880188614296565b6040517fc26bebcc00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260208801356024820152604401611054565b6110dd87878787878787612848565b50505050505050565b6000336110f485828561297b565b6110ff858585612a4a565b60019150505b9392505050565b611114612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff16461461117f576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b68056bc75e2d63100000602082013561119d604084013584356144cf565b6111a791906144cf565b146111de576040517fd092e7b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356011819055602080830135601281905560408085013560138190558151948552928401919091528201527f3b4270ae8d61147b12973c792d879467685ec408647743ce9b9afd6a0763289c906060015b60405180910390a150565b611243612af5565b61124d8282612b48565b5050565b6040805180820190915260008082526020820152600061128160408501356060860135610e966020880188614296565b9150506000806112918684612b9d565b90925090506112ae6112a66020880188614296565b838388612cf4565b9695505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff164614611323576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61132d3382612de2565b6113373382612e3e565b50565b60036020908152600092835260408084209091529082529020805461135e90614424565b80601f016020809104026020016040519081016040528092919081815260200182805461138a90614424565b80156113d75780601f106113ac576101008083540402835291602001916113d7565b820191906000526020600020905b8154815290600101906020018083116113ba57829003601f168201915b505050505081565b6113e7612af5565b73ffffffffffffffffffffffffffffffffffffffff8216611434576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526010602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f8ef11fcc7ba2acd30d3c67a4ed9b0261e93c5bb66d31d5dd4dff82c83d860bda910160405180910390a25050565b6114c6612af5565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ff0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d441419790602001611230565b61155d60405180606001604052806000815260200160008152602001600081525090565b5060408051606081018252601154815260125460208201526013549181019190915290565b61158a612af5565b610fe56000612ecc565b73ffffffffffffffffffffffffffffffffffffffff811630145b949350505050565b6115be612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff164614611629576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611676576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ff782216d1b02bb841c11576e3acbe7ef0dcc261caed6eee061871387f3cfd18190602001611230565b6116f1612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff16461461175c576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166117a9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ff520447191196b125f76f7110397fdf32b1b9cefb7dec323bd3b998022ac233890602001611230565b606060098054610d4a90614424565b611833612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff16461461189e576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166118eb576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f0345019a4b882f65ce6451a4c87d09510f8606cb6eb18799aba7018d65ebada590602001611230565b604080518082019091526014546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041660208201526000906119a88161247f565b91505090565b600033610ddb818585612a4a565b6119c4612af5565b61124d6119d182846145c3565b612f41565b63ffffffff8416600090815260036020908152604080832061ffff87168452909152812080546060929190611a0a90614424565b80601f0160208091040260200160405190810160405280929190818152602001828054611a3690614424565b8015611a835780601f10611a5857610100808354040283529160200191611a83565b820191906000526020600020905b815481529060010190602001808311611a6657829003601f168201915b505050505090508051600003611ad35783838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294506115ae9350505050565b6000839003611ae35790506115ae565b60028310611b6157611b2a84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061304892505050565b80611b3884600281886146ef565b604051602001611b4a93929190614719565b6040516020818303038152906040529150506115ae565b83836040517f9a6d49cd00000000000000000000000000000000000000000000000000000000815260040161105492919061478a565b60005b81811015611ca05736838383818110611bb557611bb561479e565b9050602002810190611bc791906147cd565b9050611bfa611bd96020830183614296565b602083013563ffffffff919091166000908152600160205260409020541490565b611c045750611c98565b3063d045a0dc60c08301358360a0810135611c2361010083018361480b565b611c34610100890160e08a0161418b565b611c426101208a018a61480b565b6040518963ffffffff1660e01b8152600401611c649796959493929190614886565b6000604051808303818588803b158015611c7d57600080fd5b505af1158015611c91573d6000803e3d6000fd5b5050505050505b600101611b9a565b503373ffffffffffffffffffffffffffffffffffffffff16638e9e70996040518163ffffffff1660e01b8152600401600060405180830381865afa158015611cec573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611d32919081019061491a565b6040517f8351eea70000000000000000000000000000000000000000000000000000000081526004016110549190613d8f565b611d6d613cd9565b60408051808201909152600080825260208201526000611d9060a087018761480b565b90501115611dca576040517f9cad625100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602085013573ffffffffffffffffffffffffffffffffffffffff8116158015611e3757506fffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016611e2e6020880188614296565b63ffffffff1614155b15611e6e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811615801590611ea957503373ffffffffffffffffffffffffffffffffffffffff821614155b15611efe576040517fd1d0c78400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff82166024820152604401611054565b600080611f213360408a013560608b0135611f1c60208d018d614296565b61308d565b91509150600080611f328a84612b9d565b9092509050611f5e611f4760208c018c614296565b8383611f58368e90038e018e614988565b8c6130b3565b60408051808201909152858152602080820186905282519299509097503391907f85496b760a4b7f8d66384b9df21b381f5d1b1e79f229a47aaf4c232edc2fe59a90611fac908e018e614296565b6040805163ffffffff909216825260208201899052810187905260600160405180910390a35050505050935093915050565b611fe6612af5565b6040517fca5eb5e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e190602401600060405180830381600087803b15801561206f57600080fd5b505af1158015612083573d6000803e3d6000fd5b5050505050565b612092612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff1646146120fd576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61210a60208201826149d9565b6fffffffffffffffffffffffffffffffff161580612147575061213360408201602083016149d9565b6fffffffffffffffffffffffffffffffff16155b1561217e576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c5474010000000000000000000000000000000000000000900463ffffffff166000036121f257600c80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000004263ffffffff16021790556121fa565b6121fa610eb9565b80601461220782826149f6565b507fb3cfdbde4244db49a852e823f0cd30cbb8d07432d26b944547cfe887f09e3fb2905061223860208301836149d9565b61224860408401602085016149d9565b604080516fffffffffffffffffffffffffffffffff938416815292909116602083015201611230565b3330146122aa576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110dd878787878787876110ce565b6122c1612af5565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c242776090602001611230565b604080518082019091526014546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041660208201526000906119a8816131cb565b612386612af5565b73ffffffffffffffffffffffffffffffffffffffff81166123d6576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b61133781612ecc565b60006020820180359060019083906123f79086614296565b63ffffffff1681526020810191909152604001600020541492915050565b610fe183838360016131e2565b60008061242e8561332a565b915081905083811015612477576040517f71c4efed0000000000000000000000000000000000000000000000000000000081526004810182905260248101859052604401611054565b935093915050565b600c5460009074010000000000000000000000000000000000000000900463ffffffff168082036124b35750600092915050565b600f5460208401516fffffffffffffffffffffffffffffffff166125116124e063ffffffff851642614a77565b6124f6846b033b2e3c9fd0803ce8000000614a77565b87516fffffffffffffffffffffffffffffffff166000613361565b61251b9190614ab9565b92506b033b2e3c9fd0803ce800000061253484836144cf565b111561254c57806b033b2e3c9fd0803ce80000000392505b5050919050565b6000811580159061257c57506b033b2e3c9fd0803ce800000082600f5461257a91906144cf565b145b6125935769021e19e0c9bab2400000821015610de1565b600192915050565b60006125b783600001548368056bc75e2d631000006000613361565b9050801561266757600a546125e29073ffffffffffffffffffffffffffffffffffffffff168261339d565b600a546040517f654f2fc80000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff9091169063654f2fc890602401600060405180830381600087803b15801561264e57600080fd5b505af1158015612662573d6000803e3d6000fd5b505050505b600061268384600101548468056bc75e2d631000006000613361565b9050801561273357600b546126ae9073ffffffffffffffffffffffffffffffffffffffff168261339d565b600b546040517f654f2fc80000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff9091169063654f2fc890602401600060405180830381600087803b15801561271a57600080fd5b505af115801561272e573d6000803e3d6000fd5b505050505b6000816127408486614a77565b61274a9190614a77565b9050801561277557600c546127759073ffffffffffffffffffffffffffffffffffffffff168261339d565b83600d600082825461278791906144cf565b9250508190555083600f60008282546127a091906144cf565b909155505060408051848152602081018490529081018290524260608201527ff7576d8c2653e9d07af5ef229acf59b339e327d4e0eaddb4a96615534cf148f89060800160405180910390a15050505050565b63ffffffff811660009081526001602052604081205480610de1576040517ff6ff4fb700000000000000000000000000000000000000000000000000000000815263ffffffff84166004820152602401611054565b6028841115612883576040517f9cad625100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061289561289287876133f9565b90565b73ffffffffffffffffffffffffffffffffffffffff16036128d4576128cf60208801356128ca6128c58888613411565b613434565b612e3e565b6110dd565b60006128e361289287876133f9565b9050600061290a826128f86128c58a8a613411565b61290560208d018d614296565b61346a565b905073ffffffffffffffffffffffffffffffffffffffff8216887fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c61295260208d018d614296565b6040805163ffffffff9092168252602082018690520160405180910390a3505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600660209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114612a445781811015612a35576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401611054565b612a44848484840360006131e2565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316612a9a576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b73ffffffffffffffffffffffffffffffffffffffff8216612aea576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b610fe183838361349f565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fe5576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401611054565b63ffffffff8216600081815260016020908152604091829020849055815192835282018390527f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b910160405180910390a15050565b6060806000612bfa8560200135612bb38661359c565b612bc060a089018961480b565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506135c892505050565b9093509050600081612c0d576001612c10565b60025b9050612c30612c226020880188614296565b82610b5c60808a018a61480b565b60045490935073ffffffffffffffffffffffffffffffffffffffff1615612ceb57600480546040517f043a78eb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169163043a78eb91612ca8918891889101614af4565b602060405180830381865afa158015612cc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce99190614b19565b505b50509250929050565b60408051808201909152600080825260208201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddc28c586040518060a001604052808863ffffffff168152602001612d64896127f3565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b8152600401612d99929190614b36565b6040805180830381865afa158015612db5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd99190614c0b565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612e32576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b61124d8260008361349f565b600081600e54612e4e91906144cf565b600e8190559050600082600f54612e659190614a77565b600f819055604080518581526020810183905290810184905290915073ffffffffffffffffffffffffffffffffffffffff8516907f87dad80f3ba50e9e7ca4442fee6772eb468383860cc7e9d493b2b6bc33da7d199060600160405180910390a250505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b815181101561301857612f73828281518110612f6257612f6261479e565b602002602001015160400151613048565b818181518110612f8557612f8561479e565b60200260200101516040015160036000848481518110612fa757612fa761479e565b60200260200101516000015163ffffffff1663ffffffff1681526020019081526020016000206000848481518110612fe157612fe161479e565b60200260200101516020015161ffff1661ffff168152602001908152602001600020908161300f9190614c6e565b50600101612f44565b507fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b674816040516112309190614d87565b600281015161ffff811660031461124d57816040517f9a6d49cd0000000000000000000000000000000000000000000000000000000081526004016110549190613d8f565b60008061309b858585612422565b90925090506130aa8683612de2565b94509492505050565b6130bb613cd9565b60006130ca846000015161365a565b6020850151909150156130e4576130e4846020015161369b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632637a450826040518060a001604052808b63ffffffff1681526020016131418c6127f3565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b815260040161317d929190614b36565b60806040518083038185885af115801561319b573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906131c09190614e35565b979650505050505050565b6000806131d78361247f565b905061110581612553565b73ffffffffffffffffffffffffffffffffffffffff8416613232576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b73ffffffffffffffffffffffffffffffffffffffff8316613282576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526006602090815260408083209387168352929052208290558015612a44578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161331c91815260200190565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006133578184614ab9565b610de19190614e81565b600061336e8585856137bd565b905081801561338d57506000838061338857613388614a8a565b858709115b156115ae57612dd96001826144cf565b73ffffffffffffffffffffffffffffffffffffffff82166133ed576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b61124d6000838361349f565b600061340860208284866146ef565b61110591614e98565b60006134216028602084866146ef565b61342a91614ed4565b60c01c9392505050565b6000610de17f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff8416614e81565b600073ffffffffffffffffffffffffffffffffffffffff841661348d5761dead93505b613497848461339d565b509092915050565b73ffffffffffffffffffffffffffffffffffffffff8316158015906134d9575073ffffffffffffffffffffffffffffffffffffffff821615155b156135915773ffffffffffffffffffffffffffffffffffffffff831660009081526010602052604090205460ff1615801561353a575073ffffffffffffffffffffffffffffffffffffffff821660009081526010602052604090205460ff16155b15613591576040517fd1d0c78400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808516600483015283166024820152604401611054565b610fe18383836138c8565b6000610de17f000000000000000000000000000000000000000000000000000000000000000083614ab9565b805160609015158061362957848460405160200161361592919091825260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016602082015260280190565b604051602081830303815290604052613650565b848433856040516020016136409493929190614f3a565b6040516020818303038152906040525b9150935093915050565b6000813414613697576040517f9f704120000000000000000000000000000000000000000000000000000000008152346004820152602401611054565b5090565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa158015613708573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061372c9190614f93565b905073ffffffffffffffffffffffffffffffffffffffff811661377b576040517f5373352a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61124d73ffffffffffffffffffffffffffffffffffffffff8216337f000000000000000000000000000000000000000000000000000000000000000085613a73565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036138155783828161380b5761380b614a8a565b0492505050611105565b83811061385f576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401611054565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b73ffffffffffffffffffffffffffffffffffffffff83166139005780600760008282546138f591906144cf565b909155506139b29050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604090205481811015613986576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024810182905260448101839052606401611054565b73ffffffffffffffffffffffffffffffffffffffff841660009081526005602052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff82166139db57600780548290039055613a07565b73ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051613a6691815260200190565b60405180910390a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8581166024830152848116604483015260648083018590528351808403909101815260849092019092526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052612a4491869190600090613b1490841683613b88565b90508051600014158015613b39575080806020019051810190613b379190614b19565b155b15610fe1576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611054565b606061110583836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051613bbb9190614fb0565b60006040518083038185875af1925050503d8060008114613bf8576040519150601f19603f3d011682016040523d82523d6000602084013e613bfd565b606091505b50915091506112ae868383606082613c1d57613c1882613c97565b611105565b8151158015613c41575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613c90576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401611054565b5080611105565b805115613ca75780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806060016040528060008019168152602001600067ffffffffffffffff168152602001613d1c604051806040016040528060008152602001600081525090565b905290565b60005b83811015613d3c578181015183820152602001613d24565b50506000910152565b60008151808452613d5d816020860160208601613d21565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006111056020830184613d45565b73ffffffffffffffffffffffffffffffffffffffff8116811461133757600080fd5b60008060408385031215613dd757600080fd5b8235613de281613da2565b946020939093013593505050565b600060e08284031215613e0257600080fd5b50919050565b600060208284031215613e1a57600080fd5b813567ffffffffffffffff811115613e3157600080fd5b6115ae84828501613df0565b8351815260208085015190820152600060a0820160a0604084015280855180835260c08501915060c08160051b86010192506020870160005b82811015613edc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff408786030184528151805186526020810151905060406020870152613ec66040870182613d45565b9550506020938401939190910190600101613e76565b50508551606086015250506020840151608084015290506115ae565b600060608284031215613e0257600080fd5b60008083601f840112613f1c57600080fd5b50813567ffffffffffffffff811115613f3457600080fd5b602083019150836020828501011115613f4c57600080fd5b9250929050565b600080600080600080600060e0888a031215613f6e57600080fd5b613f788989613ef8565b965060608801359550608088013567ffffffffffffffff811115613f9b57600080fd5b613fa78a828b01613f0a565b90965094505060a0880135613fbb81613da2565b925060c088013567ffffffffffffffff811115613fd757600080fd5b613fe38a828b01613f0a565b989b979a50959850939692959293505050565b60008060006060848603121561400b57600080fd5b833561401681613da2565b9250602084013561402681613da2565b929592945050506040919091013590565b60006060828403121561404957600080fd5b6111058383613ef8565b803563ffffffff8116811461406757600080fd5b919050565b6000806040838503121561407f57600080fd5b613de283614053565b801515811461133757600080fd5b600080604083850312156140a957600080fd5b823567ffffffffffffffff8111156140c057600080fd5b6140cc85828601613df0565b92505060208301356140dd81614088565b809150509250929050565b815181526020808301519082015260408101610de1565b60006020828403121561411157600080fd5b5035919050565b803561ffff8116811461406757600080fd5b6000806040838503121561413d57600080fd5b61414683614053565b915061415460208401614118565b90509250929050565b6000806040838503121561417057600080fd5b823561417b81613da2565b915060208301356140dd81614088565b60006020828403121561419d57600080fd5b813561110581613da2565b60008060008060a085870312156141be57600080fd5b6141c88686613ef8565b9350606085013567ffffffffffffffff8111156141e457600080fd5b6141f087828801613f0a565b909450925050608085013561420481613da2565b939692955090935050565b60008083601f84011261422157600080fd5b50813567ffffffffffffffff81111561423957600080fd5b6020830191508360208260051b8501011115613f4c57600080fd5b6000806020838503121561426757600080fd5b823567ffffffffffffffff81111561427e57600080fd5b61428a8582860161420f565b90969095509350505050565b6000602082840312156142a857600080fd5b61110582614053565b600080600080606085870312156142c757600080fd5b6142d085614053565b93506142de60208601614118565b9250604085013567ffffffffffffffff8111156142fa57600080fd5b61430687828801613f0a565b95989497509550505050565b600060408284031215613e0257600080fd5b60008060006080848603121561433957600080fd5b833567ffffffffffffffff81111561435057600080fd5b61435c86828701613df0565b93505061436c8560208601614312565b9150606084013561437c81613da2565b809150509250925092565b600060c0820190508351825267ffffffffffffffff602085015116602083015260408401516143c3604084018280518252602090810151910152565b5082516080830152602083015160a0830152611105565b6000604082840312156143ec57600080fd5b6111058383614312565b6000806040838503121561440957600080fd5b823561441481613da2565b915060208301356140dd81613da2565b600181811c9082168061443857607f821691505b602082108103613e02577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610de157610de16144a0565b6040516060810167ffffffffffffffff8111828210171561450557614505614471565b60405290565b6040805190810167ffffffffffffffff8111828210171561450557614505614471565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561457557614575614471565b604052919050565b600067ffffffffffffffff82111561459757614597614471565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600067ffffffffffffffff8311156145dd576145dd614471565b8260051b6145ed6020820161452e565b8481529083019060208101903683111561460657600080fd5b845b838110156146e557803567ffffffffffffffff81111561462757600080fd5b8601606036829003121561463a57600080fd5b6146426144e2565b61464b82614053565b815261465960208301614118565b6020820152604082013567ffffffffffffffff81111561467857600080fd5b919091019036601f83011261468c57600080fd5b813561469f61469a8261457d565b61452e565b8181523660208386010111156146b457600080fd5b8160208501602083013760006020838301015280604084015250508085525050602083019250602081019050614608565b5095945050505050565b600080858511156146ff57600080fd5b8386111561470c57600080fd5b5050820193919092039150565b6000845161472b818460208901613d21565b8201838582376000930192835250909392505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006115ae602083018486614741565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec183360301811261480157600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261484057600080fd5b83018035915067ffffffffffffffff82111561485b57600080fd5b602001915036819003821315613f4c57600080fd5b67ffffffffffffffff8116811461133757600080fd5b63ffffffff61489489614053565b16815260208881013590820152600060408901356148b181614870565b67ffffffffffffffff811660408401525087606083015260e060808301526148dd60e083018789614741565b73ffffffffffffffffffffffffffffffffffffffff861660a084015282810360c084015261490c818587614741565b9a9950505050505050505050565b60006020828403121561492c57600080fd5b815167ffffffffffffffff81111561494357600080fd5b8201601f8101841361495457600080fd5b805161496261469a8261457d565b81815285602083850101111561497757600080fd5b612dd9826020830160208601613d21565b6000604082840312801561499b57600080fd5b506149a461450b565b823581526020928301359281019290925250919050565b6fffffffffffffffffffffffffffffffff8116811461133757600080fd5b6000602082840312156149eb57600080fd5b8135611105816149bb565b8135614a01816149bb565b6fffffffffffffffffffffffffffffffff81169050807fffffffffffffffffffffffffffffffff000000000000000000000000000000008354161782556020830135614a4c816149bb565b60801b7fffffffffffffffffffffffffffffffff000000000000000000000000000000001617905550565b81810381811115610de157610de16144a0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082614aef577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b604081526000614b076040830185613d45565b8281036020840152612dd98185613d45565b600060208284031215614b2b57600080fd5b815161110581614088565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a06080840152614b6c60e0840182613d45565b905060608501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08483030160a0850152614ba78282613d45565b60809690960151151560c085015250505073ffffffffffffffffffffffffffffffffffffffff9190911660209091015290565b600060408284031215614bec57600080fd5b614bf461450b565b825181526020928301519281019290925250919050565b600060408284031215614c1d57600080fd5b6111058383614bda565b601f821115610fe157806000526020600020601f840160051c81016020851015614c4e5750805b601f840160051c820191505b818110156120835760008155600101614c5a565b815167ffffffffffffffff811115614c8857614c88614471565b614c9c81614c968454614424565b84614c27565b6020601f821160018114614cee5760008315614cb85750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455612083565b6000848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015614d3c5787850151825560209485019460019092019101614d1c565b5084821015614d7857868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b6000602082016020835280845180835260408501915060408160051b86010192506020860160005b82811015614e29577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0878603018452815163ffffffff815116865261ffff60208201511660208701526040810151905060606040870152614e136060870182613d45565b9550506020938401939190910190600101614daf565b50929695505050505050565b60006080828403128015614e4857600080fd5b50614e516144e2565b825181526020830151614e6381614870565b6020820152614e758460408501614bda565b60408201529392505050565b8082028115828204841417610de157610de16144a0565b80356020831015610de1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b80357fffffffffffffffff0000000000000000000000000000000000000000000000008116906008841015614f33577fffffffffffffffff000000000000000000000000000000000000000000000000808560080360031b1b82161691505b5092915050565b8481527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16602082015282602882015260008251614f83816048850160208701613d21565b9190910160480195945050505050565b600060208284031215614fa557600080fd5b815161110581613da2565b60008251614801818460208701613d2156fea26469706673582212205883a5fd4dd9d6985cad8f2c68c426040cc134676b8a26267c4fc2cdf1a5243d64736f6c634300081c0033",
+ "deployedBytecode": "0x6080604052600436106103c35760003560e01c80638da5cb5b116101f2578063b98bd0701161010d578063d4243885116100a0578063efca2eed1161006f578063efca2eed14610ce6578063f2fde38b14610cfb578063fc0c546a14610689578063ff7bd03d14610d1b57600080fd5b8063d424388514610be8578063d677947e14610c08578063dd62ed3e14610c1d578063e71cc65c14610c7057600080fd5b8063c7c7f5b3116100dc578063c7c7f5b314610b74578063ca5eb5e114610b95578063cb5cf37014610bb5578063d045a0dc14610bd557600080fd5b8063b98bd07014610af4578063bb0b6a5314610b14578063bc70b35414610b41578063bd815db014610b6157600080fd5b80639f335d9a11610185578063a9059cbb11610154578063a9059cbb14610a5a578063b731ea0a14610a7a578063b7de9ad614610aa7578063b918161114610ac457600080fd5b80639f335d9a146109f35780639f68b96414610a11578063a1b85eba14610a25578063a8995deb14610a4557600080fd5b80639358928b116101c15780639358928b1461097557806395d89b411461098a578063963efcaa1461099f5780639dcb114c146109d357600080fd5b80638da5cb5b146108c05780638e80ff5d146108eb5780638f2419d3146109355780638ff390991461095557600080fd5b806342966c68116102e25780637027ecfb116102755780637d25a05e116102445780637d25a05e146108235780637d9f6db51461085f57806382413eac1461088c578063857749b0146108ac57600080fd5b80637027ecfb1461076757806370a082311461079e578063715018a6146107e15780637a962f4c146107f657600080fd5b80635a0dfe4d116102b15780635a0dfe4d146106bc5780635cbeb13f146106f35780635e280f11146107135780636fc1b31e1461074757600080fd5b806342966c681461063c5780634cf088d91461065c57806352ae2879146106895780635535d4611461069c57600080fd5b806317442b701161035a578063246080271161032957806324608027146105ad578063313ce567146105cd5780633400288b146105ef5780633b6f743b1461060f57600080fd5b806317442b701461053757806318160ddd146105595780631f5e13341461057857806323b872dd1461058d57600080fd5b80631249c58b116103965780631249c58b146104a457806313137d65146104bb578063134d4f25146104ce578063156a0d0f146104f657600080fd5b806306fdde03146103c8578063095ea7b3146103f35780630d35b41514610423578063111ecdad14610452575b600080fd5b3480156103d457600080fd5b506103dd610d3b565b6040516103ea9190613d8f565b60405180910390f35b3480156103ff57600080fd5b5061041361040e366004613dc4565b610dcd565b60405190151581526020016103ea565b34801561042f57600080fd5b5061044361043e366004613e08565b610de7565b6040516103ea93929190613e3d565b34801561045e57600080fd5b5060045461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103ea565b3480156104b057600080fd5b506104b9610eb9565b005b6104b96104c9366004613f53565b610fe7565b3480156104da57600080fd5b506104e3600281565b60405161ffff90911681526020016103ea565b34801561050257600080fd5b50604080517f02e49c2c00000000000000000000000000000000000000000000000000000000815260016020820152016103ea565b34801561054357600080fd5b50604080516001815260026020820152016103ea565b34801561056557600080fd5b506007545b6040519081526020016103ea565b34801561058457600080fd5b506104e3600181565b34801561059957600080fd5b506104136105a8366004613ff6565b6110e6565b3480156105b957600080fd5b506104b96105c8366004614037565b61110c565b3480156105d957600080fd5b5060125b60405160ff90911681526020016103ea565b3480156105fb57600080fd5b506104b961060a36600461406c565b61123b565b34801561061b57600080fd5b5061062f61062a366004614096565b611251565b6040516103ea91906140e8565b34801561064857600080fd5b506104b96106573660046140ff565b6112b8565b34801561066857600080fd5b50600a5461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561069557600080fd5b503061047f565b3480156106a857600080fd5b506103dd6106b736600461412a565b61133a565b3480156106c857600080fd5b506104136106d736600461406c565b63ffffffff919091166000908152600160205260409020541490565b3480156106ff57600080fd5b506104b961070e36600461415d565b6113df565b34801561071f57600080fd5b5061047f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561075357600080fd5b506104b961076236600461418b565b6114be565b34801561077357600080fd5b5061077c611539565b60408051825181526020808401519082015291810151908201526060016103ea565b3480156107aa57600080fd5b5061056a6107b936600461418b565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b3480156107ed57600080fd5b506104b9611582565b34801561080257600080fd5b50600c5461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561082f57600080fd5b5061084661083e36600461406c565b600092915050565b60405167ffffffffffffffff90911681526020016103ea565b34801561086b57600080fd5b50600b5461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561089857600080fd5b506104136108a73660046141a8565b611594565b3480156108b857600080fd5b5060066105dd565b3480156108cc57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661047f565b3480156108f757600080fd5b50600c546109209074010000000000000000000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016103ea565b34801561094157600080fd5b506104b961095036600461418b565b6115b6565b34801561096157600080fd5b506104b961097036600461418b565b6116e9565b34801561098157600080fd5b50600f5461056a565b34801561099657600080fd5b506103dd61181c565b3480156109ab57600080fd5b5061056a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156109df57600080fd5b5061056a6b033b2e3c9fd0803ce800000081565b3480156109ff57600080fd5b5061056a69021e19e0c9bab240000081565b348015610a1d57600080fd5b506000610413565b348015610a3157600080fd5b506104b9610a4036600461418b565b61182b565b348015610a5157600080fd5b5061056a61195e565b348015610a6657600080fd5b50610413610a75366004613dc4565b6119ae565b348015610a8657600080fd5b5060025461047f9073ffffffffffffffffffffffffffffffffffffffff1681565b348015610ab357600080fd5b5061056a68056bc75e2d6310000081565b348015610ad057600080fd5b50610413610adf36600461418b565b60106020526000908152604090205460ff1681565b348015610b0057600080fd5b506104b9610b0f366004614254565b6119bc565b348015610b2057600080fd5b5061056a610b2f366004614296565b60016020526000908152604090205481565b348015610b4d57600080fd5b506103dd610b5c3660046142b1565b6119d6565b6104b9610b6f366004614254565b611b97565b610b87610b82366004614324565b611d65565b6040516103ea929190614387565b348015610ba157600080fd5b506104b9610bb036600461418b565b611fde565b348015610bc157600080fd5b506104b9610bd03660046143da565b61208a565b6104b9610be3366004613f53565b612271565b348015610bf457600080fd5b506104b9610c0336600461418b565b6122b9565b348015610c1457600080fd5b50610413612334565b348015610c2957600080fd5b5061056a610c383660046143f6565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260066020908152604080832093909416825291909152205490565b348015610c7c57600080fd5b506040805180820182526000808252602091820152815180830183526014546fffffffffffffffffffffffffffffffff80821680845270010000000000000000000000000000000090920481169284019283528451918252915190911691810191909152016103ea565b348015610cf257600080fd5b50600d5461056a565b348015610d0757600080fd5b506104b9610d1636600461418b565b61237e565b348015610d2757600080fd5b50610413610d36366004614037565b6123df565b606060088054610d4a90614424565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7690614424565b8015610dc35780601f10610d9857610100808354040283529160200191610dc3565b820191906000526020600020905b815481529060010190602001808311610da657829003601f168201915b5050505050905090565b600033610ddb818585612415565b60019150505b92915050565b60408051808201909152600080825260208201526060610e1a604051806040016040528060008152602001600081525090565b604080518082018252600080825267ffffffffffffffff602080840182905284518381529081019094529195509182610e76565b604080518082019091526000815260606020820152815260200190600190039081610e4e5790505b509350600080610e9b604089013560608a0135610e9660208c018c614296565b612422565b60408051808201909152918252602082015296989597505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff164614610f24576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091526014546fffffffffffffffffffffffffffffffff808216808452700100000000000000000000000000000000909204166020830152601190600003610f71575050565b6000610f7c8361247f565b9050610f8781612553565b610f9057505050565b600c80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000004263ffffffff1602179055610fe1828261259b565b5050505b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16331461105d576040517f91ac5e4f0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6020870180359061107790611072908a614296565b6127f3565b146110ce576110896020880188614296565b6040517fc26bebcc00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260208801356024820152604401611054565b6110dd87878787878787612848565b50505050505050565b6000336110f485828561297b565b6110ff858585612a4a565b60019150505b9392505050565b611114612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff16461461117f576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b68056bc75e2d63100000602082013561119d604084013584356144cf565b6111a791906144cf565b146111de576040517fd092e7b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356011819055602080830135601281905560408085013560138190558151948552928401919091528201527f3b4270ae8d61147b12973c792d879467685ec408647743ce9b9afd6a0763289c906060015b60405180910390a150565b611243612af5565b61124d8282612b48565b5050565b6040805180820190915260008082526020820152600061128160408501356060860135610e966020880188614296565b9150506000806112918684612b9d565b90925090506112ae6112a66020880188614296565b838388612cf4565b9695505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff164614611323576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61132d3382612de2565b6113373382612e3e565b50565b60036020908152600092835260408084209091529082529020805461135e90614424565b80601f016020809104026020016040519081016040528092919081815260200182805461138a90614424565b80156113d75780601f106113ac576101008083540402835291602001916113d7565b820191906000526020600020905b8154815290600101906020018083116113ba57829003601f168201915b505050505081565b6113e7612af5565b73ffffffffffffffffffffffffffffffffffffffff8216611434576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526010602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f8ef11fcc7ba2acd30d3c67a4ed9b0261e93c5bb66d31d5dd4dff82c83d860bda910160405180910390a25050565b6114c6612af5565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ff0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d441419790602001611230565b61155d60405180606001604052806000815260200160008152602001600081525090565b5060408051606081018252601154815260125460208201526013549181019190915290565b61158a612af5565b610fe56000612ecc565b73ffffffffffffffffffffffffffffffffffffffff811630145b949350505050565b6115be612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff164614611629576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611676576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ff782216d1b02bb841c11576e3acbe7ef0dcc261caed6eee061871387f3cfd18190602001611230565b6116f1612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff16461461175c576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166117a9576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ff520447191196b125f76f7110397fdf32b1b9cefb7dec323bd3b998022ac233890602001611230565b606060098054610d4a90614424565b611833612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff16461461189e576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166118eb576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f0345019a4b882f65ce6451a4c87d09510f8606cb6eb18799aba7018d65ebada590602001611230565b604080518082019091526014546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041660208201526000906119a88161247f565b91505090565b600033610ddb818585612a4a565b6119c4612af5565b61124d6119d182846145c3565b612f41565b63ffffffff8416600090815260036020908152604080832061ffff87168452909152812080546060929190611a0a90614424565b80601f0160208091040260200160405190810160405280929190818152602001828054611a3690614424565b8015611a835780601f10611a5857610100808354040283529160200191611a83565b820191906000526020600020905b815481529060010190602001808311611a6657829003601f168201915b505050505090508051600003611ad35783838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294506115ae9350505050565b6000839003611ae35790506115ae565b60028310611b6157611b2a84848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061304892505050565b80611b3884600281886146ef565b604051602001611b4a93929190614719565b6040516020818303038152906040529150506115ae565b83836040517f9a6d49cd00000000000000000000000000000000000000000000000000000000815260040161105492919061478a565b60005b81811015611ca05736838383818110611bb557611bb561479e565b9050602002810190611bc791906147cd565b9050611bfa611bd96020830183614296565b602083013563ffffffff919091166000908152600160205260409020541490565b611c045750611c98565b3063d045a0dc60c08301358360a0810135611c2361010083018361480b565b611c34610100890160e08a0161418b565b611c426101208a018a61480b565b6040518963ffffffff1660e01b8152600401611c649796959493929190614886565b6000604051808303818588803b158015611c7d57600080fd5b505af1158015611c91573d6000803e3d6000fd5b5050505050505b600101611b9a565b503373ffffffffffffffffffffffffffffffffffffffff16638e9e70996040518163ffffffff1660e01b8152600401600060405180830381865afa158015611cec573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611d32919081019061491a565b6040517f8351eea70000000000000000000000000000000000000000000000000000000081526004016110549190613d8f565b611d6d613cd9565b60408051808201909152600080825260208201526000611d9060a087018761480b565b90501115611dca576040517f9cad625100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602085013573ffffffffffffffffffffffffffffffffffffffff8116158015611e3757506fffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016611e2e6020880188614296565b63ffffffff1614155b15611e6e576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811615801590611ea957503373ffffffffffffffffffffffffffffffffffffffff821614155b15611efe576040517fd1d0c78400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff82166024820152604401611054565b600080611f213360408a013560608b0135611f1c60208d018d614296565b61308d565b91509150600080611f328a84612b9d565b9092509050611f5e611f4760208c018c614296565b8383611f58368e90038e018e614988565b8c6130b3565b60408051808201909152858152602080820186905282519299509097503391907f85496b760a4b7f8d66384b9df21b381f5d1b1e79f229a47aaf4c232edc2fe59a90611fac908e018e614296565b6040805163ffffffff909216825260208201899052810187905260600160405180910390a35050505050935093915050565b611fe6612af5565b6040517fca5eb5e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e190602401600060405180830381600087803b15801561206f57600080fd5b505af1158015612083573d6000803e3d6000fd5b5050505050565b612092612af5565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff1646146120fd576040517f10dfc03300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61210a60208201826149d9565b6fffffffffffffffffffffffffffffffff161580612147575061213360408201602083016149d9565b6fffffffffffffffffffffffffffffffff16155b1561217e576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c5474010000000000000000000000000000000000000000900463ffffffff166000036121f257600c80547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000004263ffffffff16021790556121fa565b6121fa610eb9565b80601461220782826149f6565b507fb3cfdbde4244db49a852e823f0cd30cbb8d07432d26b944547cfe887f09e3fb2905061223860208301836149d9565b61224860408401602085016149d9565b604080516fffffffffffffffffffffffffffffffff938416815292909116602083015201611230565b3330146122aa576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110dd878787878787876110ce565b6122c1612af5565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c242776090602001611230565b604080518082019091526014546fffffffffffffffffffffffffffffffff80821683527001000000000000000000000000000000009091041660208201526000906119a8816131cb565b612386612af5565b73ffffffffffffffffffffffffffffffffffffffff81166123d6576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b61133781612ecc565b60006020820180359060019083906123f79086614296565b63ffffffff1681526020810191909152604001600020541492915050565b610fe183838360016131e2565b60008061242e8561332a565b915081905083811015612477576040517f71c4efed0000000000000000000000000000000000000000000000000000000081526004810182905260248101859052604401611054565b935093915050565b600c5460009074010000000000000000000000000000000000000000900463ffffffff168082036124b35750600092915050565b600f5460208401516fffffffffffffffffffffffffffffffff166125116124e063ffffffff851642614a77565b6124f6846b033b2e3c9fd0803ce8000000614a77565b87516fffffffffffffffffffffffffffffffff166000613361565b61251b9190614ab9565b92506b033b2e3c9fd0803ce800000061253484836144cf565b111561254c57806b033b2e3c9fd0803ce80000000392505b5050919050565b6000811580159061257c57506b033b2e3c9fd0803ce800000082600f5461257a91906144cf565b145b6125935769021e19e0c9bab2400000821015610de1565b600192915050565b60006125b783600001548368056bc75e2d631000006000613361565b9050801561266757600a546125e29073ffffffffffffffffffffffffffffffffffffffff168261339d565b600a546040517f654f2fc80000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff9091169063654f2fc890602401600060405180830381600087803b15801561264e57600080fd5b505af1158015612662573d6000803e3d6000fd5b505050505b600061268384600101548468056bc75e2d631000006000613361565b9050801561273357600b546126ae9073ffffffffffffffffffffffffffffffffffffffff168261339d565b600b546040517f654f2fc80000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff9091169063654f2fc890602401600060405180830381600087803b15801561271a57600080fd5b505af115801561272e573d6000803e3d6000fd5b505050505b6000816127408486614a77565b61274a9190614a77565b9050801561277557600c546127759073ffffffffffffffffffffffffffffffffffffffff168261339d565b83600d600082825461278791906144cf565b9250508190555083600f60008282546127a091906144cf565b909155505060408051848152602081018490529081018290524260608201527ff7576d8c2653e9d07af5ef229acf59b339e327d4e0eaddb4a96615534cf148f89060800160405180910390a15050505050565b63ffffffff811660009081526001602052604081205480610de1576040517ff6ff4fb700000000000000000000000000000000000000000000000000000000815263ffffffff84166004820152602401611054565b6028841115612883576040517f9cad625100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061289561289287876133f9565b90565b73ffffffffffffffffffffffffffffffffffffffff16036128d4576128cf60208801356128ca6128c58888613411565b613434565b612e3e565b6110dd565b60006128e361289287876133f9565b9050600061290a826128f86128c58a8a613411565b61290560208d018d614296565b61346a565b905073ffffffffffffffffffffffffffffffffffffffff8216887fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c61295260208d018d614296565b6040805163ffffffff9092168252602082018690520160405180910390a3505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600660209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114612a445781811015612a35576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401611054565b612a44848484840360006131e2565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316612a9a576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b73ffffffffffffffffffffffffffffffffffffffff8216612aea576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b610fe183838361349f565b60005473ffffffffffffffffffffffffffffffffffffffff163314610fe5576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401611054565b63ffffffff8216600081815260016020908152604091829020849055815192835282018390527f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b910160405180910390a15050565b6060806000612bfa8560200135612bb38661359c565b612bc060a089018961480b565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506135c892505050565b9093509050600081612c0d576001612c10565b60025b9050612c30612c226020880188614296565b82610b5c60808a018a61480b565b60045490935073ffffffffffffffffffffffffffffffffffffffff1615612ceb57600480546040517f043a78eb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169163043a78eb91612ca8918891889101614af4565b602060405180830381865afa158015612cc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce99190614b19565b505b50509250929050565b60408051808201909152600080825260208201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddc28c586040518060a001604052808863ffffffff168152602001612d64896127f3565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b8152600401612d99929190614b36565b6040805180830381865afa158015612db5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd99190614c0b565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612e32576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b61124d8260008361349f565b600081600e54612e4e91906144cf565b600e8190559050600082600f54612e659190614a77565b600f819055604080518581526020810183905290810184905290915073ffffffffffffffffffffffffffffffffffffffff8516907f87dad80f3ba50e9e7ca4442fee6772eb468383860cc7e9d493b2b6bc33da7d199060600160405180910390a250505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b815181101561301857612f73828281518110612f6257612f6261479e565b602002602001015160400151613048565b818181518110612f8557612f8561479e565b60200260200101516040015160036000848481518110612fa757612fa761479e565b60200260200101516000015163ffffffff1663ffffffff1681526020019081526020016000206000848481518110612fe157612fe161479e565b60200260200101516020015161ffff1661ffff168152602001908152602001600020908161300f9190614c6e565b50600101612f44565b507fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b674816040516112309190614d87565b600281015161ffff811660031461124d57816040517f9a6d49cd0000000000000000000000000000000000000000000000000000000081526004016110549190613d8f565b60008061309b858585612422565b90925090506130aa8683612de2565b94509492505050565b6130bb613cd9565b60006130ca846000015161365a565b6020850151909150156130e4576130e4846020015161369b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632637a450826040518060a001604052808b63ffffffff1681526020016131418c6127f3565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b815260040161317d929190614b36565b60806040518083038185885af115801561319b573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906131c09190614e35565b979650505050505050565b6000806131d78361247f565b905061110581612553565b73ffffffffffffffffffffffffffffffffffffffff8416613232576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b73ffffffffffffffffffffffffffffffffffffffff8316613282576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526006602090815260408083209387168352929052208290558015612a44578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161331c91815260200190565b60405180910390a350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006133578184614ab9565b610de19190614e81565b600061336e8585856137bd565b905081801561338d57506000838061338857613388614a8a565b858709115b156115ae57612dd96001826144cf565b73ffffffffffffffffffffffffffffffffffffffff82166133ed576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401611054565b61124d6000838361349f565b600061340860208284866146ef565b61110591614e98565b60006134216028602084866146ef565b61342a91614ed4565b60c01c9392505050565b6000610de17f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff8416614e81565b600073ffffffffffffffffffffffffffffffffffffffff841661348d5761dead93505b613497848461339d565b509092915050565b73ffffffffffffffffffffffffffffffffffffffff8316158015906134d9575073ffffffffffffffffffffffffffffffffffffffff821615155b156135915773ffffffffffffffffffffffffffffffffffffffff831660009081526010602052604090205460ff1615801561353a575073ffffffffffffffffffffffffffffffffffffffff821660009081526010602052604090205460ff16155b15613591576040517fd1d0c78400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808516600483015283166024820152604401611054565b610fe18383836138c8565b6000610de17f000000000000000000000000000000000000000000000000000000000000000083614ab9565b805160609015158061362957848460405160200161361592919091825260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016602082015260280190565b604051602081830303815290604052613650565b848433856040516020016136409493929190614f3a565b6040516020818303038152906040525b9150935093915050565b6000813414613697576040517f9f704120000000000000000000000000000000000000000000000000000000008152346004820152602401611054565b5090565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa158015613708573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061372c9190614f93565b905073ffffffffffffffffffffffffffffffffffffffff811661377b576040517f5373352a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61124d73ffffffffffffffffffffffffffffffffffffffff8216337f000000000000000000000000000000000000000000000000000000000000000085613a73565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff858709858702925082811083820303915050806000036138155783828161380b5761380b614a8a565b0492505050611105565b83811061385f576040517f63a05778000000000000000000000000000000000000000000000000000000008152600481018790526024810186905260448101859052606401611054565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b73ffffffffffffffffffffffffffffffffffffffff83166139005780600760008282546138f591906144cf565b909155506139b29050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604090205481811015613986576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024810182905260448101839052606401611054565b73ffffffffffffffffffffffffffffffffffffffff841660009081526005602052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff82166139db57600780548290039055613a07565b73ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051613a6691815260200190565b60405180910390a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8581166024830152848116604483015260648083018590528351808403909101815260849092019092526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052612a4491869190600090613b1490841683613b88565b90508051600014158015613b39575080806020019051810190613b379190614b19565b155b15610fe1576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401611054565b606061110583836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051613bbb9190614fb0565b60006040518083038185875af1925050503d8060008114613bf8576040519150601f19603f3d011682016040523d82523d6000602084013e613bfd565b606091505b50915091506112ae868383606082613c1d57613c1882613c97565b611105565b8151158015613c41575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613c90576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401611054565b5080611105565b805115613ca75780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806060016040528060008019168152602001600067ffffffffffffffff168152602001613d1c604051806040016040528060008152602001600081525090565b905290565b60005b83811015613d3c578181015183820152602001613d24565b50506000910152565b60008151808452613d5d816020860160208601613d21565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006111056020830184613d45565b73ffffffffffffffffffffffffffffffffffffffff8116811461133757600080fd5b60008060408385031215613dd757600080fd5b8235613de281613da2565b946020939093013593505050565b600060e08284031215613e0257600080fd5b50919050565b600060208284031215613e1a57600080fd5b813567ffffffffffffffff811115613e3157600080fd5b6115ae84828501613df0565b8351815260208085015190820152600060a0820160a0604084015280855180835260c08501915060c08160051b86010192506020870160005b82811015613edc577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff408786030184528151805186526020810151905060406020870152613ec66040870182613d45565b9550506020938401939190910190600101613e76565b50508551606086015250506020840151608084015290506115ae565b600060608284031215613e0257600080fd5b60008083601f840112613f1c57600080fd5b50813567ffffffffffffffff811115613f3457600080fd5b602083019150836020828501011115613f4c57600080fd5b9250929050565b600080600080600080600060e0888a031215613f6e57600080fd5b613f788989613ef8565b965060608801359550608088013567ffffffffffffffff811115613f9b57600080fd5b613fa78a828b01613f0a565b90965094505060a0880135613fbb81613da2565b925060c088013567ffffffffffffffff811115613fd757600080fd5b613fe38a828b01613f0a565b989b979a50959850939692959293505050565b60008060006060848603121561400b57600080fd5b833561401681613da2565b9250602084013561402681613da2565b929592945050506040919091013590565b60006060828403121561404957600080fd5b6111058383613ef8565b803563ffffffff8116811461406757600080fd5b919050565b6000806040838503121561407f57600080fd5b613de283614053565b801515811461133757600080fd5b600080604083850312156140a957600080fd5b823567ffffffffffffffff8111156140c057600080fd5b6140cc85828601613df0565b92505060208301356140dd81614088565b809150509250929050565b815181526020808301519082015260408101610de1565b60006020828403121561411157600080fd5b5035919050565b803561ffff8116811461406757600080fd5b6000806040838503121561413d57600080fd5b61414683614053565b915061415460208401614118565b90509250929050565b6000806040838503121561417057600080fd5b823561417b81613da2565b915060208301356140dd81614088565b60006020828403121561419d57600080fd5b813561110581613da2565b60008060008060a085870312156141be57600080fd5b6141c88686613ef8565b9350606085013567ffffffffffffffff8111156141e457600080fd5b6141f087828801613f0a565b909450925050608085013561420481613da2565b939692955090935050565b60008083601f84011261422157600080fd5b50813567ffffffffffffffff81111561423957600080fd5b6020830191508360208260051b8501011115613f4c57600080fd5b6000806020838503121561426757600080fd5b823567ffffffffffffffff81111561427e57600080fd5b61428a8582860161420f565b90969095509350505050565b6000602082840312156142a857600080fd5b61110582614053565b600080600080606085870312156142c757600080fd5b6142d085614053565b93506142de60208601614118565b9250604085013567ffffffffffffffff8111156142fa57600080fd5b61430687828801613f0a565b95989497509550505050565b600060408284031215613e0257600080fd5b60008060006080848603121561433957600080fd5b833567ffffffffffffffff81111561435057600080fd5b61435c86828701613df0565b93505061436c8560208601614312565b9150606084013561437c81613da2565b809150509250925092565b600060c0820190508351825267ffffffffffffffff602085015116602083015260408401516143c3604084018280518252602090810151910152565b5082516080830152602083015160a0830152611105565b6000604082840312156143ec57600080fd5b6111058383614312565b6000806040838503121561440957600080fd5b823561441481613da2565b915060208301356140dd81613da2565b600181811c9082168061443857607f821691505b602082108103613e02577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610de157610de16144a0565b6040516060810167ffffffffffffffff8111828210171561450557614505614471565b60405290565b6040805190810167ffffffffffffffff8111828210171561450557614505614471565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561457557614575614471565b604052919050565b600067ffffffffffffffff82111561459757614597614471565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600067ffffffffffffffff8311156145dd576145dd614471565b8260051b6145ed6020820161452e565b8481529083019060208101903683111561460657600080fd5b845b838110156146e557803567ffffffffffffffff81111561462757600080fd5b8601606036829003121561463a57600080fd5b6146426144e2565b61464b82614053565b815261465960208301614118565b6020820152604082013567ffffffffffffffff81111561467857600080fd5b919091019036601f83011261468c57600080fd5b813561469f61469a8261457d565b61452e565b8181523660208386010111156146b457600080fd5b8160208501602083013760006020838301015280604084015250508085525050602083019250602081019050614608565b5095945050505050565b600080858511156146ff57600080fd5b8386111561470c57600080fd5b5050820193919092039150565b6000845161472b818460208901613d21565b8201838582376000930192835250909392505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006115ae602083018486614741565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec183360301811261480157600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261484057600080fd5b83018035915067ffffffffffffffff82111561485b57600080fd5b602001915036819003821315613f4c57600080fd5b67ffffffffffffffff8116811461133757600080fd5b63ffffffff61489489614053565b16815260208881013590820152600060408901356148b181614870565b67ffffffffffffffff811660408401525087606083015260e060808301526148dd60e083018789614741565b73ffffffffffffffffffffffffffffffffffffffff861660a084015282810360c084015261490c818587614741565b9a9950505050505050505050565b60006020828403121561492c57600080fd5b815167ffffffffffffffff81111561494357600080fd5b8201601f8101841361495457600080fd5b805161496261469a8261457d565b81815285602083850101111561497757600080fd5b612dd9826020830160208601613d21565b6000604082840312801561499b57600080fd5b506149a461450b565b823581526020928301359281019290925250919050565b6fffffffffffffffffffffffffffffffff8116811461133757600080fd5b6000602082840312156149eb57600080fd5b8135611105816149bb565b8135614a01816149bb565b6fffffffffffffffffffffffffffffffff81169050807fffffffffffffffffffffffffffffffff000000000000000000000000000000008354161782556020830135614a4c816149bb565b60801b7fffffffffffffffffffffffffffffffff000000000000000000000000000000001617905550565b81810381811115610de157610de16144a0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082614aef577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b604081526000614b076040830185613d45565b8281036020840152612dd98185613d45565b600060208284031215614b2b57600080fd5b815161110581614088565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a06080840152614b6c60e0840182613d45565b905060608501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08483030160a0850152614ba78282613d45565b60809690960151151560c085015250505073ffffffffffffffffffffffffffffffffffffffff9190911660209091015290565b600060408284031215614bec57600080fd5b614bf461450b565b825181526020928301519281019290925250919050565b600060408284031215614c1d57600080fd5b6111058383614bda565b601f821115610fe157806000526020600020601f840160051c81016020851015614c4e5750805b601f840160051c820191505b818110156120835760008155600101614c5a565b815167ffffffffffffffff811115614c8857614c88614471565b614c9c81614c968454614424565b84614c27565b6020601f821160018114614cee5760008315614cb85750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455612083565b6000848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015614d3c5787850151825560209485019460019092019101614d1c565b5084821015614d7857868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b6000602082016020835280845180835260408501915060408160051b86010192506020860160005b82811015614e29577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0878603018452815163ffffffff815116865261ffff60208201511660208701526040810151905060606040870152614e136060870182613d45565b9550506020938401939190910190600101614daf565b50929695505050505050565b60006080828403128015614e4857600080fd5b50614e516144e2565b825181526020830151614e6381614870565b6020820152614e758460408501614bda565b60408201529392505050565b8082028115828204841417610de157610de16144a0565b80356020831015610de1577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b80357fffffffffffffffff0000000000000000000000000000000000000000000000008116906008841015614f33577fffffffffffffffff000000000000000000000000000000000000000000000000808560080360031b1b82161691505b5092915050565b8481527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16602082015282602882015260008251614f83816048850160208701613d21565b9190910160480195945050505050565b600060208284031215614fa557600080fd5b815161110581613da2565b60008251614801818460208701613d2156fea26469706673582212205883a5fd4dd9d6985cad8f2c68c426040cc134676b8a26267c4fc2cdf1a5243d64736f6c634300081c0033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/TempleGoldAdmin.sol/TempleGoldAdmin.json b/apps/dapp/abi/contracts/templegold/TempleGoldAdmin.sol/TempleGoldAdmin.json
new file mode 100644
index 000000000..6425c02df
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/TempleGoldAdmin.sol/TempleGoldAdmin.json
@@ -0,0 +1,526 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "TempleGoldAdmin",
+ "sourceName": "contracts/templegold/TempleGoldAdmin.sol",
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_rescuer",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_templeGold",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAccess",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAddress",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "ExplicitAccessSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "RescueModeSet",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "acceptExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_contract",
+ "type": "address"
+ },
+ {
+ "internalType": "bool",
+ "name": "_whitelist",
+ "type": "bool"
+ }
+ ],
+ "name": "authorizeContract",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "executor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "name": "explicitFunctionAccess",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "inRescueMode",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rescuer",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_delegate",
+ "type": "address"
+ }
+ ],
+ "name": "setDelegate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "staking",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "auction",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gnosis",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct ITempleGold.DistributionParams",
+ "name": "_params",
+ "type": "tuple"
+ }
+ ],
+ "name": "setDistributionParams",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint16",
+ "name": "msgType",
+ "type": "uint16"
+ },
+ {
+ "internalType": "bytes",
+ "name": "options",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct EnforcedOptionParam[]",
+ "name": "_enforcedOptions",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setEnforcedOptions",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "allowedCaller",
+ "type": "address"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowed",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct ITempleElevatedAccess.ExplicitAccess[]",
+ "name": "access",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setExplicitAccess",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_msgInspector",
+ "type": "address"
+ }
+ ],
+ "name": "setMsgInspector",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "_peer",
+ "type": "bytes32"
+ }
+ ],
+ "name": "setPeer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_preCrime",
+ "type": "address"
+ }
+ ],
+ "name": "setPreCrime",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "setRescueMode",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_auction",
+ "type": "address"
+ }
+ ],
+ "name": "setStableGoldAuction",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_staking",
+ "type": "address"
+ }
+ ],
+ "name": "setStaking",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_gnosis",
+ "type": "address"
+ }
+ ],
+ "name": "setTeamGnosis",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "value",
+ "type": "uint128"
+ },
+ {
+ "internalType": "uint128",
+ "name": "weekMultiplier",
+ "type": "uint128"
+ }
+ ],
+ "internalType": "struct ITempleGold.VestingFactor",
+ "name": "_factor",
+ "type": "tuple"
+ }
+ ],
+ "name": "setVestingFactor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "templeGold",
+ "outputs": [
+ {
+ "internalType": "contract ITempleGold",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+ ],
+ "bytecode": "0x60a060405234801561001057600080fd5b50604051611d1c380380611d1c83398101604081905261002f91610108565b82826001600160a01b0382166100585760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03811661007f5760405163e6c4247b60e01b815260040160405180910390fd5b816001600160a01b0316816001600160a01b0316036100b15760405163e6c4247b60e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b039485161790915560018054909116918316919091179055166080525061014b9050565b80516001600160a01b038116811461010357600080fd5b919050565b60008060006060848603121561011d57600080fd5b610126846100ec565b9250610134602085016100ec565b9150610142604085016100ec565b90509250925092565b608051611b696101b3600039600081816103700152818161073f015281816108530152818161097a01528181610a5201528181610c6a01528181610d4201528181610e1a01528181610eea015281816111c1015281816112a2015261138f0152611b696000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c80638ff39099116100d8578063ca5eb5e11161008c578063d9a349c111610066578063d9a349c11461032a578063daeccc791461033d578063e110dfda1461036b57600080fd5b8063ca5eb5e1146102f1578063cb5cf37014610304578063d42438851461031757600080fd5b8063b98bd070116100bd578063b98bd070146102ab578063bfccf0ec146102be578063c34c08e5146102d157600080fd5b80638ff3909914610285578063a1b85eba1461029857600080fd5b80633400288b1161013a5780636fc1b31e116101145780636fc1b31e146102575780638112c4af1461026a5780638f2419d31461027257600080fd5b80633400288b146101ec57806338a63183146101ff5780635cbeb13f1461024457600080fd5b80631810fe7f1161016b5780631810fe7f146101af5780631f211405146101d157806324608027146101d957600080fd5b8063032ef9011461018757806307f184f11461019c575b600080fd5b61019a6101953660046115dc565b610392565b005b61019a6101aa366004611622565b610441565b6003546101bc9060ff1681565b60405190151581526020015b60405180910390f35b61019a610579565b61019a6101e736600461168d565b610698565b61019a6101fa366004611726565b6107b4565b60005461021f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c8565b61019a610252366004611750565b6108c9565b61019a610265366004611622565b6109a9565b61019a610a81565b61019a610280366004611622565b610bc1565b61019a610293366004611622565b610c99565b61019a6102a6366004611622565b610d71565b61019a6102b9366004611783565b610e49565b61019a6102cc3660046117fa565b610f21565b60015461021f9073ffffffffffffffffffffffffffffffffffffffff1681565b61019a6102ff366004611622565b611118565b61019a6103123660046118a2565b6111f0565b61019a610325366004611622565b6112e6565b61019a610338366004611622565b6113be565b6101bc61034b366004611911565b600260209081526000928352604080842090915290825290205460ff1681565b61021f7f000000000000000000000000000000000000000000000000000000000000000081565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103e3576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610492576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166104df576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46003805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1633146105ca576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff16330361061b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600480549091169055565b6106c6336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b6106fc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517f2460802700000000000000000000000000000000000000000000000000000000815282516004820152602083015160248201529082015160448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906324608027906064015b600060405180830381600087803b15801561079957600080fd5b505af11580156107ad573d6000803e3d6000fd5b5050505050565b6107e2336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610818576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f3400288b00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633400288b906044015b600060405180830381600087803b1580156108ad57600080fd5b505af11580156108c1573d6000803e3d6000fd5b505050505050565b6108f7336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b61092d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f5cbeb13f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015282151560248301527f00000000000000000000000000000000000000000000000000000000000000001690635cbeb13f90604401610893565b6109d7336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610a0d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f6fc1b31e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636fc1b31e9060240161077f565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314610ad7576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff163303610b28576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b610bef336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610c25576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f8f2419d300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f00000000000000000000000000000000000000000000000000000000000000001690638f2419d39060240161077f565b610cc7336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610cfd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f8ff3909900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f00000000000000000000000000000000000000000000000000000000000000001690638ff390999060240161077f565b610d9f336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610dd5576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa1b85eba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a1b85eba9060240161077f565b610e77336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610ead576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fb98bd07000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063b98bd070906108939085908590600401611984565b610f4f336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610f85576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610fd2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b828110156108c15784848281811061100557611005611ad1565b90506040020180360381019061101b9190611b00565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260028352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610feb565b611146336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b61117c576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fca5eb5e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e19060240161077f565b61121e336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b611254576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fcb5cf37000000000000000000000000000000000000000000000000000000000815281516fffffffffffffffffffffffffffffffff908116600483015260208301511660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063cb5cf3709060440161077f565b611314336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b61134a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fd424388500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063d42438859060240161077f565b6113ec336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b611422576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661146f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045460015460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60035460009060ff1615611535575060005473ffffffffffffffffffffffffffffffffffffffff8381169116146115c1565b60015473ffffffffffffffffffffffffffffffffffffffff848116911614806115b0575073ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b156115bd575060016115c1565b5060005b92915050565b803580151581146115d757600080fd5b919050565b6000602082840312156115ee57600080fd5b6115f7826115c7565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146115d757600080fd5b60006020828403121561163457600080fd5b6115f7826115fe565b6040805190810167ffffffffffffffff81118282101715611687577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405290565b600060608284031280156116a057600080fd5b506040516000906060810167ffffffffffffffff811182821017156116ec577f4e487b710000000000000000000000000000000000000000000000000000000083526041600452602483fd5b604090815284358252602080860135908301529384013593810193909352509092915050565b803563ffffffff811681146115d757600080fd5b6000806040838503121561173957600080fd5b61174283611712565b946020939093013593505050565b6000806040838503121561176357600080fd5b61176c836115fe565b915061177a602084016115c7565b90509250929050565b6000806020838503121561179657600080fd5b823567ffffffffffffffff8111156117ad57600080fd5b8301601f810185136117be57600080fd5b803567ffffffffffffffff8111156117d557600080fd5b8560208260051b84010111156117ea57600080fd5b6020919091019590945092505050565b60008060006040848603121561180f57600080fd5b611818846115fe565b9250602084013567ffffffffffffffff81111561183457600080fd5b8401601f8101861361184557600080fd5b803567ffffffffffffffff81111561185c57600080fd5b8660208260061b840101111561187157600080fd5b939660209190910195509293505050565b80356fffffffffffffffffffffffffffffffff811681146115d757600080fd5b600060408284031280156118b557600080fd5b506118be61163d565b6118c783611882565b81526118d560208401611882565b60208201529392505050565b80357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d757600080fd5b6000806040838503121561192457600080fd5b61192d836115fe565b915061177a602084016118e1565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020808252810182905260006040600584901b8301810190830185837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa136839003015b87821015611ac4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184528235818112611a0457600080fd5b890163ffffffff611a1482611712565b168652602081013561ffff8116808214611a2d57600080fd5b6020880152506040810135368290037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1018112611a6957600080fd5b0160208101903567ffffffffffffffff811115611a8557600080fd5b803603821315611a9457600080fd5b60606040880152611aa960608801828461193b565b965050506020830192506020840193506001820191506119c7565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006040828403128015611b1357600080fd5b50611b1c61163d565b611b25836118e1565b81526118d5602084016115c756fea2646970667358221220145f5a521c2a976507eb592d6ce5a6a6e61e7c3374a3f4e5cf6004ae1ad767d264736f6c634300081c0033",
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101825760003560e01c80638ff39099116100d8578063ca5eb5e11161008c578063d9a349c111610066578063d9a349c11461032a578063daeccc791461033d578063e110dfda1461036b57600080fd5b8063ca5eb5e1146102f1578063cb5cf37014610304578063d42438851461031757600080fd5b8063b98bd070116100bd578063b98bd070146102ab578063bfccf0ec146102be578063c34c08e5146102d157600080fd5b80638ff3909914610285578063a1b85eba1461029857600080fd5b80633400288b1161013a5780636fc1b31e116101145780636fc1b31e146102575780638112c4af1461026a5780638f2419d31461027257600080fd5b80633400288b146101ec57806338a63183146101ff5780635cbeb13f1461024457600080fd5b80631810fe7f1161016b5780631810fe7f146101af5780631f211405146101d157806324608027146101d957600080fd5b8063032ef9011461018757806307f184f11461019c575b600080fd5b61019a6101953660046115dc565b610392565b005b61019a6101aa366004611622565b610441565b6003546101bc9060ff1681565b60405190151581526020015b60405180910390f35b61019a610579565b61019a6101e736600461168d565b610698565b61019a6101fa366004611726565b6107b4565b60005461021f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c8565b61019a610252366004611750565b6108c9565b61019a610265366004611622565b6109a9565b61019a610a81565b61019a610280366004611622565b610bc1565b61019a610293366004611622565b610c99565b61019a6102a6366004611622565b610d71565b61019a6102b9366004611783565b610e49565b61019a6102cc3660046117fa565b610f21565b60015461021f9073ffffffffffffffffffffffffffffffffffffffff1681565b61019a6102ff366004611622565b611118565b61019a6103123660046118a2565b6111f0565b61019a610325366004611622565b6112e6565b61019a610338366004611622565b6113be565b6101bc61034b366004611911565b600260209081526000928352604080842090915290825290205460ff1681565b61021f7f000000000000000000000000000000000000000000000000000000000000000081565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103e3576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610492576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166104df576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46003805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60045473ffffffffffffffffffffffffffffffffffffffff1633146105ca576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff16330361061b576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600480549091169055565b6106c6336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b6106fc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517f2460802700000000000000000000000000000000000000000000000000000000815282516004820152602083015160248201529082015160448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906324608027906064015b600060405180830381600087803b15801561079957600080fd5b505af11580156107ad573d6000803e3d6000fd5b5050505050565b6107e2336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610818576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f3400288b00000000000000000000000000000000000000000000000000000000815263ffffffff83166004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690633400288b906044015b600060405180830381600087803b1580156108ad57600080fd5b505af11580156108c1573d6000803e3d6000fd5b505050505050565b6108f7336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b61092d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f5cbeb13f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015282151560248301527f00000000000000000000000000000000000000000000000000000000000000001690635cbeb13f90604401610893565b6109d7336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610a0d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f6fc1b31e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f00000000000000000000000000000000000000000000000000000000000000001690636fc1b31e9060240161077f565b600354610100900473ffffffffffffffffffffffffffffffffffffffff163314610ad7576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff163303610b28576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b610bef336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610c25576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f8f2419d300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f00000000000000000000000000000000000000000000000000000000000000001690638f2419d39060240161077f565b610cc7336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610cfd576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f8ff3909900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f00000000000000000000000000000000000000000000000000000000000000001690638ff390999060240161077f565b610d9f336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610dd5576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fa1b85eba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063a1b85eba9060240161077f565b610e77336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610ead576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fb98bd07000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063b98bd070906108939085908590600401611984565b610f4f336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b610f85576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316610fd2576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b828110156108c15784848281811061100557611005611ad1565b90506040020180360381019061101b9190611b00565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260028352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610feb565b611146336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b61117c576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fca5eb5e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e19060240161077f565b61121e336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b611254576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fcb5cf37000000000000000000000000000000000000000000000000000000000815281516fffffffffffffffffffffffffffffffff908116600483015260208301511660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063cb5cf3709060440161077f565b611314336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b61134a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fd424388500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063d42438859060240161077f565b6113ec336000357fffffffff0000000000000000000000000000000000000000000000000000000016611503565b611422576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811661146f576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045460015460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60035460009060ff1615611535575060005473ffffffffffffffffffffffffffffffffffffffff8381169116146115c1565b60015473ffffffffffffffffffffffffffffffffffffffff848116911614806115b0575073ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b156115bd575060016115c1565b5060005b92915050565b803580151581146115d757600080fd5b919050565b6000602082840312156115ee57600080fd5b6115f7826115c7565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146115d757600080fd5b60006020828403121561163457600080fd5b6115f7826115fe565b6040805190810167ffffffffffffffff81118282101715611687577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405290565b600060608284031280156116a057600080fd5b506040516000906060810167ffffffffffffffff811182821017156116ec577f4e487b710000000000000000000000000000000000000000000000000000000083526041600452602483fd5b604090815284358252602080860135908301529384013593810193909352509092915050565b803563ffffffff811681146115d757600080fd5b6000806040838503121561173957600080fd5b61174283611712565b946020939093013593505050565b6000806040838503121561176357600080fd5b61176c836115fe565b915061177a602084016115c7565b90509250929050565b6000806020838503121561179657600080fd5b823567ffffffffffffffff8111156117ad57600080fd5b8301601f810185136117be57600080fd5b803567ffffffffffffffff8111156117d557600080fd5b8560208260051b84010111156117ea57600080fd5b6020919091019590945092505050565b60008060006040848603121561180f57600080fd5b611818846115fe565b9250602084013567ffffffffffffffff81111561183457600080fd5b8401601f8101861361184557600080fd5b803567ffffffffffffffff81111561185c57600080fd5b8660208260061b840101111561187157600080fd5b939660209190910195509293505050565b80356fffffffffffffffffffffffffffffffff811681146115d757600080fd5b600060408284031280156118b557600080fd5b506118be61163d565b6118c783611882565b81526118d560208401611882565b60208201529392505050565b80357fffffffff00000000000000000000000000000000000000000000000000000000811681146115d757600080fd5b6000806040838503121561192457600080fd5b61192d836115fe565b915061177a602084016118e1565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020808252810182905260006040600584901b8301810190830185837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa136839003015b87821015611ac4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08786030184528235818112611a0457600080fd5b890163ffffffff611a1482611712565b168652602081013561ffff8116808214611a2d57600080fd5b6020880152506040810135368290037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1018112611a6957600080fd5b0160208101903567ffffffffffffffff811115611a8557600080fd5b803603821315611a9457600080fd5b60606040880152611aa960608801828461193b565b965050506020830192506020840193506001820191506119c7565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006040828403128015611b1357600080fd5b50611b1c61163d565b611b25836118e1565b81526118d5602084016115c756fea2646970667358221220145f5a521c2a976507eb592d6ce5a6a6e61e7c3374a3f4e5cf6004ae1ad767d264736f6c634300081c0033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/TempleGoldStaking.sol/TempleGoldStaking.json b/apps/dapp/abi/contracts/templegold/TempleGoldStaking.sol/TempleGoldStaking.json
new file mode 100644
index 000000000..d002ec1ea
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/TempleGoldStaking.sol/TempleGoldStaking.json
@@ -0,0 +1,1403 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "TempleGoldStaking",
+ "sourceName": "contracts/templegold/TempleGoldStaking.sol",
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_rescuer",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_stakingToken",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_rewardToken",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "target",
+ "type": "address"
+ }
+ ],
+ "name": "AddressEmptyCode",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "AddressInsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotDelegate",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotDistribute",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "CannotStake",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "EnforcedPause",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ExpectedNonZero",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ExpectedPause",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "FailedInnerCall",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "required",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "balance",
+ "type": "uint256"
+ }
+ ],
+ "name": "InsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAccess",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAddress",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidBlockNumber",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidOperation",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidParam",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "NoStaker",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "SafeERC20FailedOperation",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "timestampnow",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "unstakeTime",
+ "type": "uint256"
+ }
+ ],
+ "name": "UnstakeCooldown",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "daoExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "DAOExecutorSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "delegator",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "fromDelegate",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "toDelegate",
+ "type": "address"
+ }
+ ],
+ "name": "DelegateChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "previousBalance",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "newBalance",
+ "type": "uint256"
+ }
+ ],
+ "name": "DelegateVotesChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "starter",
+ "type": "address"
+ }
+ ],
+ "name": "DistributionStarterSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "ExplicitAccessSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "timestamp",
+ "type": "uint256"
+ }
+ ],
+ "name": "GoldDistributionNotified",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "migrator",
+ "type": "address"
+ }
+ ],
+ "name": "MigratorSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedExecutor",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedExecutor",
+ "type": "address"
+ }
+ ],
+ "name": "NewExecutorProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerAccepted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldProposedRescuer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newProposedRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "NewRescuerProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "RescueModeSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint160",
+ "name": "cooldown",
+ "type": "uint160"
+ }
+ ],
+ "name": "RewardDistributionCoolDownSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "duration",
+ "type": "uint256"
+ }
+ ],
+ "name": "RewardDurationSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "staker",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "toAddress",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "reward",
+ "type": "uint256"
+ }
+ ],
+ "name": "RewardPaid",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "staker",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Staked",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenRecovered",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint32",
+ "name": "period",
+ "type": "uint32"
+ }
+ ],
+ "name": "UnstakeCooldownSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "staker",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Withdrawn",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "MAXIMUM_UNSTAKE_COOLDOWN",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "WEEK_LENGTH",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptRescuer",
+ "outputs": [],
+ "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": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "claimableRewards",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "daoExecutor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "delegatee",
+ "type": "address"
+ }
+ ],
+ "name": "delegate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "delegates",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "delegate",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "distributeGold",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "distributeRewards",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "distributionStarter",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "earned",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "executor",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "name": "explicitFunctionAccess",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "getAccountUnstakeTime",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "epoch",
+ "type": "uint256"
+ }
+ ],
+ "name": "getCheckpoint",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "fromBlock",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "votes",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct ITempleGoldStaking.Checkpoint",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "getCurrentVotes",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "blockNumber",
+ "type": "uint256"
+ }
+ ],
+ "name": "getPriorVotes",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "staker",
+ "type": "address"
+ }
+ ],
+ "name": "getReward",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getRewardData",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint40",
+ "name": "periodFinish",
+ "type": "uint40"
+ },
+ {
+ "internalType": "uint216",
+ "name": "rewardRate",
+ "type": "uint216"
+ },
+ {
+ "internalType": "uint40",
+ "name": "lastUpdateTime",
+ "type": "uint40"
+ },
+ {
+ "internalType": "uint216",
+ "name": "rewardPerTokenStored",
+ "type": "uint216"
+ }
+ ],
+ "internalType": "struct ITempleGoldStaking.Reward",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "inRescueMode",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "lastRewardNotificationTimestamp",
+ "outputs": [
+ {
+ "internalType": "uint96",
+ "name": "",
+ "type": "uint96"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "staker",
+ "type": "address"
+ }
+ ],
+ "name": "migrateWithdraw",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "migrator",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "nextRewardAmount",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "notifyDistribution",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "numCheckpoints",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "number",
+ "type": "uint256"
+ }
+ ],
+ "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": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "proposeNewRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_token",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "recoverToken",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rescuer",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardDistributionCoolDown",
+ "outputs": [
+ {
+ "internalType": "uint160",
+ "name": "",
+ "type": "uint160"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardDuration",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardPerToken",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardPeriodFinish",
+ "outputs": [
+ {
+ "internalType": "uint40",
+ "name": "",
+ "type": "uint40"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rewardToken",
+ "outputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ }
+ ],
+ "name": "setDaoExecutor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_starter",
+ "type": "address"
+ }
+ ],
+ "name": "setDistributionStarter",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "allowedCaller",
+ "type": "address"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes4",
+ "name": "fnSelector",
+ "type": "bytes4"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowed",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct ITempleElevatedAccess.ExplicitAccess[]",
+ "name": "access",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "setExplicitAccess",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_migrator",
+ "type": "address"
+ }
+ ],
+ "name": "setMigrator",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bool",
+ "name": "value",
+ "type": "bool"
+ }
+ ],
+ "name": "setRescueMode",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint160",
+ "name": "_cooldown",
+ "type": "uint160"
+ }
+ ],
+ "name": "setRewardDistributionCoolDown",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "_duration",
+ "type": "uint256"
+ }
+ ],
+ "name": "setRewardDuration",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_period",
+ "type": "uint32"
+ }
+ ],
+ "name": "setUnstakeCooldown",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "stake",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "stakeTimes",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "stakeTime",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "stakingToken",
+ "outputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unstakeCooldown",
+ "outputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "userRewardPerTokenPaid",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bool",
+ "name": "claimRewards",
+ "type": "bool"
+ }
+ ],
+ "name": "withdraw",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+ ],
+ "bytecode": "0x60c060405234801561001057600080fd5b50604051613ee9380380613ee983398101604081905261002f9161011b565b83836001600160a01b0382166100585760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03811661007f5760405163e6c4247b60e01b815260040160405180910390fd5b816001600160a01b0316816001600160a01b0316036100b15760405163e6c4247b60e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b0394851617909155600180549091169183169190911790556004805460ff60a01b191690559182166080521660a0525061016f9050565b80516001600160a01b038116811461011657600080fd5b919050565b6000806000806080858703121561013157600080fd5b61013a856100ff565b9350610148602086016100ff565b9250610156604086016100ff565b9150610164606086016100ff565b905092959194509250565b60805160a051613d1d6101cc6000396000818161099c015281816112c701528181611d6f01528181612c7401526130ec01526000818161071e01528181611d1a015281816129df01528181612aa80152612fae0152613d1d6000f3fe608060405234801561001057600080fd5b506004361061036c5760003560e01c8063763c4036116101d3578063bfccf0ec11610104578063da4e88f2116100a2578063e9a776991161007c578063e9a776991461096e578063f520e7e51461098e578063f7c618c114610997578063fc83c95b146109be57600080fd5b8063da4e88f214610900578063daeccc7914610920578063dc01f60d1461094e57600080fd5b8063c34c08e5116100de578063c34c08e5146108bd578063ccb51004146108dd578063cd3daf9d146108e5578063d9a349c1146108ed57600080fd5b8063bfccf0ec14610884578063c00007b014610897578063c0ed00c9146108aa57600080fd5b80638963888c11610171578063a3f9f7d01161014b578063a3f9f7d014610838578063a694fc3a1461084b578063a7229fd91461085e578063b4b5ea571461087157600080fd5b80638963888c146107b85780638b876347146108055780639c0421991461082557600080fd5b80637cd07e47116101ad5780637cd07e47146107705780637eefd5ae146107985780638112c4af146107a85780638456cb59146107b057600080fd5b8063763c403614610740578063782d6fe11461075357806379dac2a01461076657600080fd5b806338d07436116102ad5780635c975abb1161024b5780636f4a2cd0116102255780636f4a2cd0146106bb5780636fcfff45146106c357806370a08231146106e357806372f702f31461071957600080fd5b80635c975abb1461057e578063654f2fc8146105a1578063668845d8146105b457600080fd5b806347f761f51161028757806347f761f5146104f45780634c92c5cd14610522578063587cde1e146105355780635c19a95c1461056b57600080fd5b806338d07436146104b95780633f4ba83a146104cc578063406194c5146104d457600080fd5b806318160ddd1161031a57806323cf3118116102f457806323cf31181461043f578063279084a61461045257806337a583581461046b57806338a631831461047457600080fd5b806318160ddd1461040e5780631ad25ffb146104175780631f2114051461043757600080fd5b8063135918081161034b57806313591808146103bf57806315ead477146103de5780631810fe7f146103f157600080fd5b80628cc26214610371578063032ef9011461039757806307f184f1146103ac575b600080fd5b61038461037f366004613900565b6109d1565b6040519081526020015b60405180910390f35b6103aa6103a536600461392b565b6109ef565b005b6103aa6103ba366004613900565b610a9e565b6103c962278d0081565b60405163ffffffff909116815260200161038e565b6103aa6103ec366004613900565b610bd6565b6003546103fe9060ff1681565b604051901515815260200161038e565b61038460075481565b610384610425366004613900565b60146020526000908152604090205481565b6103aa610cf6565b6103aa61044d366004613900565b610e15565b600c5460405164ffffffffff909116815260200161038e565b61038460085481565b6000546104949073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161038e565b6103aa6104c7366004613948565b610fbd565b6103aa611048565b6006546104949073ffffffffffffffffffffffffffffffffffffffff1681565b610507610502366004613978565b6110b6565b6040805182518152602092830151928101929092520161038e565b6103aa610530366004613900565b61110f565b610494610543366004613900565b600f6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6103aa610579366004613900565b6112a2565b60045474010000000000000000000000000000000000000000900460ff166103fe565b6103aa6105af3660046139a4565b6112af565b61063b6040805160808101825260008082526020820181905291810182905260608101919091525060408051608081018252600c5464ffffffffff80821683527affffffffffffffffffffffffffffffffffffffffffffffffffffff650100000000009283900481166020850152600d549182169484019490945204909116606082015290565b60405161038e9190600060808201905064ffffffffff83511682527affffffffffffffffffffffffffffffffffffffffffffffffffffff602084015116602083015264ffffffffff60408401511660408301527affffffffffffffffffffffffffffffffffffffffffffffffffffff606084015116606083015292915050565b6103aa6113a3565b6103846106d1366004613900565b60136020526000908152604090205481565b6103846106f1366004613900565b73ffffffffffffffffffffffffffffffffffffffff166000908152600e602052604090205490565b6104947f000000000000000000000000000000000000000000000000000000000000000081565b61038461074e366004613900565b611649565b610384610761366004613978565b6116ba565b61038462093a8081565b600b5461049490640100000000900473ffffffffffffffffffffffffffffffffffffffff1681565b600b546103c99063ffffffff1681565b6103aa611907565b6103aa611a47565b600a546107e8907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff909116815260200161038e565b610384610813366004613900565b60116020526000908152604090205481565b610384610833366004613900565b611ab3565b6103aa6108463660046139bd565b611b98565b6103aa6108593660046139a4565b611ca2565b6103aa61086c3660046139e3565b611cb4565b61038461087f366004613900565b611e81565b6103aa610892366004613a24565b611efd565b6103aa6108a5366004613900565b6120fc565b6103aa6108b83660046139a4565b61222c565b6001546104949073ffffffffffffffffffffffffffffffffffffffff1681565b6103aa612346565b610384612356565b6103aa6108fb366004613900565b612365565b600a546104949073ffffffffffffffffffffffffffffffffffffffff1681565b6103fe61092e366004613ade565b600260209081526000928352604080842090915290825290205460ff1681565b61038461095c366004613900565b60106020526000908152604090205481565b6005546104949073ffffffffffffffffffffffffffffffffffffffff1681565b61038460095481565b6104947f000000000000000000000000000000000000000000000000000000000000000081565b6103aa6109cc366004613900565b6124aa565b6000806109dc612581565b90506109e8838261267b565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a40576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610aef576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610b3c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46003805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b610c04336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b610c3a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610c87576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f7cbcf2db31edf0f80b106b728f3e8f75d23576649e580cde45821df75db331e990600090a250565b60045473ffffffffffffffffffffffffffffffffffffffff163314610d47576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff163303610d98576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600480549091169055565b60065473ffffffffffffffffffffffffffffffffffffffff16610e9b57610e60336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b610e96576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610eec565b60065473ffffffffffffffffffffffffffffffffffffffff163314610eec576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610f39576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffff0000000000000000000000000000000000000000ffffffff1664010000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f3ba4758949febc607e14523620298f8b5995b1848492ad7aa083372ac886ae07906020015b60405180910390a150565b610fc56127c7565b600b54336000908152601460205260408120549091610fec9163ffffffff90911690613b42565b905042811115611036576040517f497e9598000000000000000000000000000000000000000000000000000000008152426004820152602481018290526044015b60405180910390fd5b611043333385853361281c565b505050565b611076336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b6110ac576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110b4612b3b565b565b6040805180820182526000808252602091820181905273ffffffffffffffffffffffffffffffffffffffff8516815260128252828120848252825282902082518084019093528054835260010154908201525b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff166111955761115a336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611190576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111e6565b60065473ffffffffffffffffffffffffffffffffffffffff1633146111e6576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611233576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f16d61a8ae20f45aed7c5f705859e84b0292aabf52ce61496c63db9ab14c228b490600090a250565b6112ac3382612bb8565b50565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801590611320575061131e336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b155b15611357576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600860008282546113699190613b42565b9091555050604080518281524260208201527f1e215fdd40f0b4854c5a2b2cfe53859ca232f085a5b129c9f65b6bfeb094c5e49101610fb2565b6113ab6127c7565b6000806113b6612581565b600d80547affffffffffffffffffffffffffffffffffffffffffffffffffffff8316650100000000000264ffffffffff91821617909155600c549192506113fd9116612c5d565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9290921691909117905573ffffffffffffffffffffffffffffffffffffffff8216156114c85761147682827affffffffffffffffffffffffffffffffffffffffffffffffffffff1661267b565b73ffffffffffffffffffffffffffffffffffffffff831660009081526010602090815260408083209390935560119052207affffffffffffffffffffffffffffffffffffffffffffffffffffff821690555b5060055473ffffffffffffffffffffffffffffffffffffffff16331461151a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600754600003611556576040517f1090380d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5442906115a29073ffffffffffffffffffffffffffffffffffffffff8116907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16613b55565b73ffffffffffffffffffffffffffffffffffffffff1611156115f0576040517f51e624a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6115f8612c72565b600854600954811015611637576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060085561164581612cee565b5050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260146020526040812054156116b257600b5473ffffffffffffffffffffffffffffffffffffffff83166000908152601460205260409020546116ad9163ffffffff1690613b42565b611109565b600092915050565b60004382106116f5576040517f4e47846c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152601360205260408120549081900361172d576000915050611109565b73ffffffffffffffffffffffffffffffffffffffff84166000908152601260205260408120849161175f600185613b81565b815260200190815260200160002060000154116117c15773ffffffffffffffffffffffffffffffffffffffff84166000908152601260205260408120906117a7600184613b81565b815260200190815260200160002060010154915050611109565b73ffffffffffffffffffffffffffffffffffffffff84166000908152601260209081526040808320838052909152902054831015611803576000915050611109565b600080611811600184613b81565b90505b818111156118ca576000600261182a8484613b81565b6118349190613b94565b61183e9083613b81565b73ffffffffffffffffffffffffffffffffffffffff881660009081526012602090815260408083208484528252918290208251808401909352805480845260019091015491830191909152919250908790036118a4576020015194506111099350505050565b80518711156118b5578193506118c3565b6118c0600183613b81565b92505b5050611814565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152601260209081526040808320938352929052206001015491505092915050565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461195d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff1633036119ae576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b611a75336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611aab576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110b4612eeb565b600b54600090640100000000900473ffffffffffffffffffffffffffffffffffffffff163314611b0f576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b5c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600e6020526040902054611b9083338360018361281c565b90505b919050565b611bc6336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611bfc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62278d0063ffffffff82161115611c3f576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff83169081179091556040519081527f885b3532bfa278e4874fcd9bcd74c49a1682c9ff7eaa6b301cea6a7969e5813190602001610fb2565b611caa6127c7565b6112ac3382612f5a565b611ce2336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611d18576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611dbd57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611df4576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e1573ffffffffffffffffffffffffffffffffffffffff84168383613012565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f909683604051611e7491815260200190565b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526013602052604081205480611eb35760006109e8565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260126020526040812090611ee4600184613b81565b8152602001908152602001600020600101549392505050565b611f2b336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611f61576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611fae576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b828110156120f457848482818110611fe157611fe1613bcf565b905060400201803603810190611ff79190613bfe565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260028352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101611fc7565b505050505050565b6121046127c7565b80600061210f612581565b600d80547affffffffffffffffffffffffffffffffffffffffffffffffffffff8316650100000000000264ffffffffff91821617909155600c549192506121569116612c5d565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9290921691909117905573ffffffffffffffffffffffffffffffffffffffff821615612221576121cf82827affffffffffffffffffffffffffffffffffffffffffffffffffffff1661267b565b73ffffffffffffffffffffffffffffffffffffffff831660009081526010602090815260408083209390935560119052207affffffffffffffffffffffffffffffffffffffffffffffffffffff821690555b506116458283613093565b61225a336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b612290576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a808110156122cd576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c544264ffffffffff90911610612311576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60098190556040518181527f823b3cede11929e1b876086e20886121c9c32f04426a36ed323a85d541df3b8e90602001610fb2565b61234e6127c7565b6110b4612c72565b6000612360612581565b905090565b612393336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b6123c9576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612416576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045460015460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6124d8336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b61250e576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ffac87d3c8a428a7011075404cc37f2669246fcd04ff5c3098e32d122de1d9c6890602001610fb2565b6000600754600014806125a25750600c54600d5464ffffffffff9081169116145b156125d45750600d546501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b600754600c54600d547affffffffffffffffffffffffffffffffffffffffffffffffffffff650100000000008304169164ffffffffff918216916126189116612c5d565b6126229190613b81565b61262c9190613c84565b61263e90670de0b6b3a7640000613c84565b6126489190613b94565b600d5461236091906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16613b42565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601060209081526040808320546011909252822054670de0b6b3a7640000906126c09085613b81565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600e60205260409020546126f09190613c84565b6126fa9190613b94565b6109e89190613b42565b60035460009060ff1615612736575060005473ffffffffffffffffffffffffffffffffffffffff838116911614611109565b60015473ffffffffffffffffffffffffffffffffffffffff848116911614806127b1575073ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b156127be57506001611109565b50600092915050565b60045474010000000000000000000000000000000000000000900460ff16156110b4576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846000612827612581565b600d80547affffffffffffffffffffffffffffffffffffffffffffffffffffff8316650100000000000264ffffffffff91821617909155600c5491925061286e9116612c5d565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9290921691909117905573ffffffffffffffffffffffffffffffffffffffff821615612939576128e782827affffffffffffffffffffffffffffffffffffffffffffffffffffff1661267b565b73ffffffffffffffffffffffffffffffffffffffff831660009081526010602090815260408083209390935560119052207affffffffffffffffffffffffffffffffffffffffffffffffffffff821690555b5083600003612974576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff86166000908152600e602052604090205480851115612a1a576040517fdb42144d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166004820152602481018690526044810182905260640161102d565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600e60205260408120868303905560078054879290612a56908490613b81565b909155505073ffffffffffffffffffffffffffffffffffffffff8088166000908152600f6020526040812054612a8e9216908761316c565b612acf73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168787613012565b6040805173ffffffffffffffffffffffffffffffffffffffff8881168252602082018890528916917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a28315612b3257612b328784613093565b50505050505050565b612b4361330f565b600480547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600f602081815260408084208054600e845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4612c5782848361316c565b50505050565b600042821015612c6b575090565b5042919050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631249c58b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612cda57600080fd5b505af1158015612c57573d6000803e3d6000fd5b600954600c5464ffffffffff164210612d6857612d0b8183613b94565b600c805464ffffffffff16650100000000007affffffffffffffffffffffffffffffffffffffffffffffffffffff93841681029190911791829055612d569284929190910416613c84565b612d609083613b81565b600855612e35565b600c54600090612d8090429064ffffffffff16613b81565b600c54909150600090612db9906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1683613c84565b905082612dc68286613b42565b612dd09190613b94565b600c805464ffffffffff16650100000000007affffffffffffffffffffffffffffffffffffffffffffffffffffff93841681029190911791829055612e1b9286929190910416613c84565b612e258286613b42565b612e2f9190613b81565b60085550505b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000164264ffffffffff811691909117909155612e76908290613b42565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff929092169190911790555050600a805473ffffffffffffffffffffffffffffffffffffffff164263ffffffff167401000000000000000000000000000000000000000002179055565b612ef36127c7565b600480547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612b8e3390565b80600003612f94576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612fd673ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084613363565b612fe082826133a9565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600f602052604081205461164592168361316c565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261104391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613572565b73ffffffffffffffffffffffffffffffffffffffff821660009081526010602052604090205480156110435773ffffffffffffffffffffffffffffffffffffffff808416600090815260106020526040812055613113907f0000000000000000000000000000000000000000000000000000000000000000168383613012565b6040805173ffffffffffffffffffffffffffffffffffffffff8481168252602082018490528516917f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e91015b60405180910390a2505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156131a85750600081115b156110435773ffffffffffffffffffffffffffffffffffffffff8316156132605773ffffffffffffffffffffffffffffffffffffffff831660009081526013602052604081205490816131fc576000613240565b73ffffffffffffffffffffffffffffffffffffffff851660009081526012602052604081209061322d600185613b81565b8152602001908152602001600020600101545b9050600061324e8483613b81565b905061325c86848484613608565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156110435773ffffffffffffffffffffffffffffffffffffffff821660009081526013602052604081205490816132af5760006132f3565b73ffffffffffffffffffffffffffffffffffffffff84166000908152601260205260408120906132e0600185613b81565b8152602001908152602001600020600101545b905060006133018483613b42565b90506120f485848484613608565b60045474010000000000000000000000000000000000000000900460ff166110b4576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8481166024830152838116604483015260648201839052612c579186918216906323b872dd9060840161304c565b8160006133b4612581565b600d80547affffffffffffffffffffffffffffffffffffffffffffffffffffff8316650100000000000264ffffffffff91821617909155600c549192506133fb9116612c5d565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9290921691909117905573ffffffffffffffffffffffffffffffffffffffff8216156134c65761347482827affffffffffffffffffffffffffffffffffffffffffffffffffffff1661267b565b73ffffffffffffffffffffffffffffffffffffffff831660009081526010602090815260408083209390935560119052207affffffffffffffffffffffffffffffffffffffffffffffffffffff821690555b5081600760008282546134d99190613b42565b909155505073ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081208054849290613513908490613b42565b909155505073ffffffffffffffffffffffffffffffffffffffff831660008181526014602052604090819020429055517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9061315f9085815260200190565b600061359473ffffffffffffffffffffffffffffffffffffffff84168361377e565b905080516000141580156135b95750808060200190518101906135b79190613c9b565b155b15611043576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260240161102d565b600083118015613659575073ffffffffffffffffffffffffffffffffffffffff841660009081526012602052604081204391613645600187613b81565b815260200190815260200160002060000154145b156136a95773ffffffffffffffffffffffffffffffffffffffff841660009081526012602052604081208291613690600187613b81565b8152602081019190915260400160002060010155613727565b604080518082018252438152602080820184815273ffffffffffffffffffffffffffffffffffffffff8816600090815260128352848120888252909252929020905181559051600191820155613700908490613b42565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601360205260409020555b604080518381526020810183905273ffffffffffffffffffffffffffffffffffffffff8616917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a250505050565b60606109e883836000846000808573ffffffffffffffffffffffffffffffffffffffff1684866040516137b19190613cb8565b60006040518083038185875af1925050503d80600081146137ee576040519150601f19603f3d011682016040523d82523d6000602084013e6137f3565b606091505b509150915061380386838361380d565b9695505050505050565b6060826138225761381d8261389c565b6109e8565b8151158015613846575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613895576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161102d565b50806109e8565b8051156138ac5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811681146112ac57600080fd5b60006020828403121561391257600080fd5b81356109e8816138de565b80151581146112ac57600080fd5b60006020828403121561393d57600080fd5b81356109e88161391d565b6000806040838503121561395b57600080fd5b82359150602083013561396d8161391d565b809150509250929050565b6000806040838503121561398b57600080fd5b8235613996816138de565b946020939093013593505050565b6000602082840312156139b657600080fd5b5035919050565b6000602082840312156139cf57600080fd5b813563ffffffff811681146109e857600080fd5b6000806000606084860312156139f857600080fd5b8335613a03816138de565b92506020840135613a13816138de565b929592945050506040919091013590565b600080600060408486031215613a3957600080fd5b8335613a44816138de565b9250602084013567ffffffffffffffff811115613a6057600080fd5b8401601f81018613613a7157600080fd5b803567ffffffffffffffff811115613a8857600080fd5b8660208260061b8401011115613a9d57600080fd5b939660209190910195509293505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611b9357600080fd5b60008060408385031215613af157600080fd5b8235613afc816138de565b9150613b0a60208401613aae565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561110957611109613b13565b73ffffffffffffffffffffffffffffffffffffffff818116838216019081111561110957611109613b13565b8181038181111561110957611109613b13565b600082613bca577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006040828403128015613c1157600080fd5b506040805190810167ffffffffffffffff81118282101715613c5c577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052613c6883613aae565b81526020830135613c788161391d565b60208201529392505050565b808202811582820484141761110957611109613b13565b600060208284031215613cad57600080fd5b81516109e88161391d565b6000825160005b81811015613cd95760208186018101518583015201613cbf565b50600092019182525091905056fea2646970667358221220a638bf31cf2f76851a14da070a6501cdf3cbb3488593a5df2dc1bf24e405af8564736f6c634300081c0033",
+ "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061036c5760003560e01c8063763c4036116101d3578063bfccf0ec11610104578063da4e88f2116100a2578063e9a776991161007c578063e9a776991461096e578063f520e7e51461098e578063f7c618c114610997578063fc83c95b146109be57600080fd5b8063da4e88f214610900578063daeccc7914610920578063dc01f60d1461094e57600080fd5b8063c34c08e5116100de578063c34c08e5146108bd578063ccb51004146108dd578063cd3daf9d146108e5578063d9a349c1146108ed57600080fd5b8063bfccf0ec14610884578063c00007b014610897578063c0ed00c9146108aa57600080fd5b80638963888c11610171578063a3f9f7d01161014b578063a3f9f7d014610838578063a694fc3a1461084b578063a7229fd91461085e578063b4b5ea571461087157600080fd5b80638963888c146107b85780638b876347146108055780639c0421991461082557600080fd5b80637cd07e47116101ad5780637cd07e47146107705780637eefd5ae146107985780638112c4af146107a85780638456cb59146107b057600080fd5b8063763c403614610740578063782d6fe11461075357806379dac2a01461076657600080fd5b806338d07436116102ad5780635c975abb1161024b5780636f4a2cd0116102255780636f4a2cd0146106bb5780636fcfff45146106c357806370a08231146106e357806372f702f31461071957600080fd5b80635c975abb1461057e578063654f2fc8146105a1578063668845d8146105b457600080fd5b806347f761f51161028757806347f761f5146104f45780634c92c5cd14610522578063587cde1e146105355780635c19a95c1461056b57600080fd5b806338d07436146104b95780633f4ba83a146104cc578063406194c5146104d457600080fd5b806318160ddd1161031a57806323cf3118116102f457806323cf31181461043f578063279084a61461045257806337a583581461046b57806338a631831461047457600080fd5b806318160ddd1461040e5780631ad25ffb146104175780631f2114051461043757600080fd5b8063135918081161034b57806313591808146103bf57806315ead477146103de5780631810fe7f146103f157600080fd5b80628cc26214610371578063032ef9011461039757806307f184f1146103ac575b600080fd5b61038461037f366004613900565b6109d1565b6040519081526020015b60405180910390f35b6103aa6103a536600461392b565b6109ef565b005b6103aa6103ba366004613900565b610a9e565b6103c962278d0081565b60405163ffffffff909116815260200161038e565b6103aa6103ec366004613900565b610bd6565b6003546103fe9060ff1681565b604051901515815260200161038e565b61038460075481565b610384610425366004613900565b60146020526000908152604090205481565b6103aa610cf6565b6103aa61044d366004613900565b610e15565b600c5460405164ffffffffff909116815260200161038e565b61038460085481565b6000546104949073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161038e565b6103aa6104c7366004613948565b610fbd565b6103aa611048565b6006546104949073ffffffffffffffffffffffffffffffffffffffff1681565b610507610502366004613978565b6110b6565b6040805182518152602092830151928101929092520161038e565b6103aa610530366004613900565b61110f565b610494610543366004613900565b600f6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6103aa610579366004613900565b6112a2565b60045474010000000000000000000000000000000000000000900460ff166103fe565b6103aa6105af3660046139a4565b6112af565b61063b6040805160808101825260008082526020820181905291810182905260608101919091525060408051608081018252600c5464ffffffffff80821683527affffffffffffffffffffffffffffffffffffffffffffffffffffff650100000000009283900481166020850152600d549182169484019490945204909116606082015290565b60405161038e9190600060808201905064ffffffffff83511682527affffffffffffffffffffffffffffffffffffffffffffffffffffff602084015116602083015264ffffffffff60408401511660408301527affffffffffffffffffffffffffffffffffffffffffffffffffffff606084015116606083015292915050565b6103aa6113a3565b6103846106d1366004613900565b60136020526000908152604090205481565b6103846106f1366004613900565b73ffffffffffffffffffffffffffffffffffffffff166000908152600e602052604090205490565b6104947f000000000000000000000000000000000000000000000000000000000000000081565b61038461074e366004613900565b611649565b610384610761366004613978565b6116ba565b61038462093a8081565b600b5461049490640100000000900473ffffffffffffffffffffffffffffffffffffffff1681565b600b546103c99063ffffffff1681565b6103aa611907565b6103aa611a47565b600a546107e8907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff909116815260200161038e565b610384610813366004613900565b60116020526000908152604090205481565b610384610833366004613900565b611ab3565b6103aa6108463660046139bd565b611b98565b6103aa6108593660046139a4565b611ca2565b6103aa61086c3660046139e3565b611cb4565b61038461087f366004613900565b611e81565b6103aa610892366004613a24565b611efd565b6103aa6108a5366004613900565b6120fc565b6103aa6108b83660046139a4565b61222c565b6001546104949073ffffffffffffffffffffffffffffffffffffffff1681565b6103aa612346565b610384612356565b6103aa6108fb366004613900565b612365565b600a546104949073ffffffffffffffffffffffffffffffffffffffff1681565b6103fe61092e366004613ade565b600260209081526000928352604080842090915290825290205460ff1681565b61038461095c366004613900565b60106020526000908152604090205481565b6005546104949073ffffffffffffffffffffffffffffffffffffffff1681565b61038460095481565b6104947f000000000000000000000000000000000000000000000000000000000000000081565b6103aa6109cc366004613900565b6124aa565b6000806109dc612581565b90506109e8838261267b565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a40576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051811515907f18f4a9a726c72020fd959c636d2fd464c6cefe90afeaea3c830b971614cf70b690600090a2600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610aef576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610b3c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035460405173ffffffffffffffffffffffffffffffffffffffff808416926101009004169033907f374d23b359cab0f8963c5c1715a6de7974f53af00aecc27de50d93906b70943e90600090a46003805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b610c04336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b610c3a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610c87576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f7cbcf2db31edf0f80b106b728f3e8f75d23576649e580cde45821df75db331e990600090a250565b60045473ffffffffffffffffffffffffffffffffffffffff163314610d47576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff163303610d98576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154604051339173ffffffffffffffffffffffffffffffffffffffff16907fe963dc9c0d2165b080440a5d2665566142f2426b1ea15f3da8390b0fd336b06490600090a3600180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600480549091169055565b60065473ffffffffffffffffffffffffffffffffffffffff16610e9b57610e60336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b610e96576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610eec565b60065473ffffffffffffffffffffffffffffffffffffffff163314610eec576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116610f39576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffff0000000000000000000000000000000000000000ffffffff1664010000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f3ba4758949febc607e14523620298f8b5995b1848492ad7aa083372ac886ae07906020015b60405180910390a150565b610fc56127c7565b600b54336000908152601460205260408120549091610fec9163ffffffff90911690613b42565b905042811115611036576040517f497e9598000000000000000000000000000000000000000000000000000000008152426004820152602481018290526044015b60405180910390fd5b611043333385853361281c565b505050565b611076336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b6110ac576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110b4612b3b565b565b6040805180820182526000808252602091820181905273ffffffffffffffffffffffffffffffffffffffff8516815260128252828120848252825282902082518084019093528054835260010154908201525b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff166111955761115a336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611190576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111e6565b60065473ffffffffffffffffffffffffffffffffffffffff1633146111e6576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611233576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f16d61a8ae20f45aed7c5f705859e84b0292aabf52ce61496c63db9ab14c228b490600090a250565b6112ac3382612bb8565b50565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801590611320575061131e336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b155b15611357576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600860008282546113699190613b42565b9091555050604080518281524260208201527f1e215fdd40f0b4854c5a2b2cfe53859ca232f085a5b129c9f65b6bfeb094c5e49101610fb2565b6113ab6127c7565b6000806113b6612581565b600d80547affffffffffffffffffffffffffffffffffffffffffffffffffffff8316650100000000000264ffffffffff91821617909155600c549192506113fd9116612c5d565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9290921691909117905573ffffffffffffffffffffffffffffffffffffffff8216156114c85761147682827affffffffffffffffffffffffffffffffffffffffffffffffffffff1661267b565b73ffffffffffffffffffffffffffffffffffffffff831660009081526010602090815260408083209390935560119052207affffffffffffffffffffffffffffffffffffffffffffffffffffff821690555b5060055473ffffffffffffffffffffffffffffffffffffffff16331461151a576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600754600003611556576040517f1090380d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5442906115a29073ffffffffffffffffffffffffffffffffffffffff8116907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16613b55565b73ffffffffffffffffffffffffffffffffffffffff1611156115f0576040517f51e624a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6115f8612c72565b600854600954811015611637576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060085561164581612cee565b5050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260146020526040812054156116b257600b5473ffffffffffffffffffffffffffffffffffffffff83166000908152601460205260409020546116ad9163ffffffff1690613b42565b611109565b600092915050565b60004382106116f5576040517f4e47846c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152601360205260408120549081900361172d576000915050611109565b73ffffffffffffffffffffffffffffffffffffffff84166000908152601260205260408120849161175f600185613b81565b815260200190815260200160002060000154116117c15773ffffffffffffffffffffffffffffffffffffffff84166000908152601260205260408120906117a7600184613b81565b815260200190815260200160002060010154915050611109565b73ffffffffffffffffffffffffffffffffffffffff84166000908152601260209081526040808320838052909152902054831015611803576000915050611109565b600080611811600184613b81565b90505b818111156118ca576000600261182a8484613b81565b6118349190613b94565b61183e9083613b81565b73ffffffffffffffffffffffffffffffffffffffff881660009081526012602090815260408083208484528252918290208251808401909352805480845260019091015491830191909152919250908790036118a4576020015194506111099350505050565b80518711156118b5578193506118c3565b6118c0600183613b81565b92505b5050611814565b5073ffffffffffffffffffffffffffffffffffffffff85166000908152601260209081526040808320938352929052206001015491505092915050565b600354610100900473ffffffffffffffffffffffffffffffffffffffff16331461195d576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff1633036119ae576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054604051339273ffffffffffffffffffffffffffffffffffffffff909216917ff07131157ebea15896dc89264eb9a7572e67cc9fad6b855015730fcec10704e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b611a75336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611aab576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110b4612eeb565b600b54600090640100000000900473ffffffffffffffffffffffffffffffffffffffff163314611b0f576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611b5c576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600e6020526040902054611b9083338360018361281c565b90505b919050565b611bc6336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611bfc576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62278d0063ffffffff82161115611c3f576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff83169081179091556040519081527f885b3532bfa278e4874fcd9bcd74c49a1682c9ff7eaa6b301cea6a7969e5813190602001610fb2565b611caa6127c7565b6112ac3382612f5a565b611ce2336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611d18576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611dbd57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611df4576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e1573ffffffffffffffffffffffffffffffffffffffff84168383613012565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f879f92dded0f26b83c3e00b12e0395dc72cfc3077343d1854ed6988edd1f909683604051611e7491815260200190565b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526013602052604081205480611eb35760006109e8565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260126020526040812090611ee4600184613b81565b8152602001908152602001600020600101549392505050565b611f2b336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b611f61576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611fae576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260008082526020820152819060005b828110156120f457848482818110611fe157611fe1613bcf565b905060400201803603810190611ff79190613bfe565b91508160200151151582600001517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff167ff5736e75de2c751f775d4c5ed517289f77074f8c337f451ba4c0c3ed1dd7f9ad60405160405180910390a460208281015173ffffffffffffffffffffffffffffffffffffffff8816600090815260028352604080822086517fffffffff000000000000000000000000000000000000000000000000000000001683529093529190912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101611fc7565b505050505050565b6121046127c7565b80600061210f612581565b600d80547affffffffffffffffffffffffffffffffffffffffffffffffffffff8316650100000000000264ffffffffff91821617909155600c549192506121569116612c5d565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9290921691909117905573ffffffffffffffffffffffffffffffffffffffff821615612221576121cf82827affffffffffffffffffffffffffffffffffffffffffffffffffffff1661267b565b73ffffffffffffffffffffffffffffffffffffffff831660009081526010602090815260408083209390935560119052207affffffffffffffffffffffffffffffffffffffffffffffffffffff821690555b506116458283613093565b61225a336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b612290576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a808110156122cd576040517fd252903400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c544264ffffffffff90911610612311576040517f398d4d3200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60098190556040518181527f823b3cede11929e1b876086e20886121c9c32f04426a36ed323a85d541df3b8e90602001610fb2565b61234e6127c7565b6110b4612c72565b6000612360612581565b905090565b612393336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b6123c9576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116612416576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045460015460405173ffffffffffffffffffffffffffffffffffffffff8085169381169216907f4857570a90fe0a0fc580e89a287e77576141ac8e2e8b3710cd26db44f44156c190600090a4600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6124d8336000357fffffffff0000000000000000000000000000000000000000000000000000000016612704565b61250e576040517fc0185c6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527ffac87d3c8a428a7011075404cc37f2669246fcd04ff5c3098e32d122de1d9c6890602001610fb2565b6000600754600014806125a25750600c54600d5464ffffffffff9081169116145b156125d45750600d546501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1690565b600754600c54600d547affffffffffffffffffffffffffffffffffffffffffffffffffffff650100000000008304169164ffffffffff918216916126189116612c5d565b6126229190613b81565b61262c9190613c84565b61263e90670de0b6b3a7640000613c84565b6126489190613b94565b600d5461236091906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff16613b42565b73ffffffffffffffffffffffffffffffffffffffff82166000908152601060209081526040808320546011909252822054670de0b6b3a7640000906126c09085613b81565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600e60205260409020546126f09190613c84565b6126fa9190613b94565b6109e89190613b42565b60035460009060ff1615612736575060005473ffffffffffffffffffffffffffffffffffffffff838116911614611109565b60015473ffffffffffffffffffffffffffffffffffffffff848116911614806127b1575073ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008616845290915290205460ff165b156127be57506001611109565b50600092915050565b60045474010000000000000000000000000000000000000000900460ff16156110b4576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846000612827612581565b600d80547affffffffffffffffffffffffffffffffffffffffffffffffffffff8316650100000000000264ffffffffff91821617909155600c5491925061286e9116612c5d565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9290921691909117905573ffffffffffffffffffffffffffffffffffffffff821615612939576128e782827affffffffffffffffffffffffffffffffffffffffffffffffffffff1661267b565b73ffffffffffffffffffffffffffffffffffffffff831660009081526010602090815260408083209390935560119052207affffffffffffffffffffffffffffffffffffffffffffffffffffff821690555b5083600003612974576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff86166000908152600e602052604090205480851115612a1a576040517fdb42144d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166004820152602481018690526044810182905260640161102d565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600e60205260408120868303905560078054879290612a56908490613b81565b909155505073ffffffffffffffffffffffffffffffffffffffff8088166000908152600f6020526040812054612a8e9216908761316c565b612acf73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168787613012565b6040805173ffffffffffffffffffffffffffffffffffffffff8881168252602082018890528916917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a28315612b3257612b328784613093565b50505050505050565b612b4361330f565b600480547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b73ffffffffffffffffffffffffffffffffffffffff8083166000818152600f602081815260408084208054600e845282862054949093528787167fffffffffffffffffffffffff00000000000000000000000000000000000000008416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4612c5782848361316c565b50505050565b600042821015612c6b575090565b5042919050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631249c58b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612cda57600080fd5b505af1158015612c57573d6000803e3d6000fd5b600954600c5464ffffffffff164210612d6857612d0b8183613b94565b600c805464ffffffffff16650100000000007affffffffffffffffffffffffffffffffffffffffffffffffffffff93841681029190911791829055612d569284929190910416613c84565b612d609083613b81565b600855612e35565b600c54600090612d8090429064ffffffffff16613b81565b600c54909150600090612db9906501000000000090047affffffffffffffffffffffffffffffffffffffffffffffffffffff1683613c84565b905082612dc68286613b42565b612dd09190613b94565b600c805464ffffffffff16650100000000007affffffffffffffffffffffffffffffffffffffffffffffffffffff93841681029190911791829055612e1b9286929190910416613c84565b612e258286613b42565b612e2f9190613b81565b60085550505b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000164264ffffffffff811691909117909155612e76908290613b42565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff929092169190911790555050600a805473ffffffffffffffffffffffffffffffffffffffff164263ffffffff167401000000000000000000000000000000000000000002179055565b612ef36127c7565b600480547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612b8e3390565b80600003612f94576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612fd673ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084613363565b612fe082826133a9565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600f602052604081205461164592168361316c565b60405173ffffffffffffffffffffffffffffffffffffffff83811660248301526044820183905261104391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613572565b73ffffffffffffffffffffffffffffffffffffffff821660009081526010602052604090205480156110435773ffffffffffffffffffffffffffffffffffffffff808416600090815260106020526040812055613113907f0000000000000000000000000000000000000000000000000000000000000000168383613012565b6040805173ffffffffffffffffffffffffffffffffffffffff8481168252602082018490528516917f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e91015b60405180910390a2505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156131a85750600081115b156110435773ffffffffffffffffffffffffffffffffffffffff8316156132605773ffffffffffffffffffffffffffffffffffffffff831660009081526013602052604081205490816131fc576000613240565b73ffffffffffffffffffffffffffffffffffffffff851660009081526012602052604081209061322d600185613b81565b8152602001908152602001600020600101545b9050600061324e8483613b81565b905061325c86848484613608565b5050505b73ffffffffffffffffffffffffffffffffffffffff8216156110435773ffffffffffffffffffffffffffffffffffffffff821660009081526013602052604081205490816132af5760006132f3565b73ffffffffffffffffffffffffffffffffffffffff84166000908152601260205260408120906132e0600185613b81565b8152602001908152602001600020600101545b905060006133018483613b42565b90506120f485848484613608565b60045474010000000000000000000000000000000000000000900460ff166110b4576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff8481166024830152838116604483015260648201839052612c579186918216906323b872dd9060840161304c565b8160006133b4612581565b600d80547affffffffffffffffffffffffffffffffffffffffffffffffffffff8316650100000000000264ffffffffff91821617909155600c549192506133fb9116612c5d565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000001664ffffffffff9290921691909117905573ffffffffffffffffffffffffffffffffffffffff8216156134c65761347482827affffffffffffffffffffffffffffffffffffffffffffffffffffff1661267b565b73ffffffffffffffffffffffffffffffffffffffff831660009081526010602090815260408083209390935560119052207affffffffffffffffffffffffffffffffffffffffffffffffffffff821690555b5081600760008282546134d99190613b42565b909155505073ffffffffffffffffffffffffffffffffffffffff83166000908152600e602052604081208054849290613513908490613b42565b909155505073ffffffffffffffffffffffffffffffffffffffff831660008181526014602052604090819020429055517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9061315f9085815260200190565b600061359473ffffffffffffffffffffffffffffffffffffffff84168361377e565b905080516000141580156135b95750808060200190518101906135b79190613c9b565b155b15611043576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260240161102d565b600083118015613659575073ffffffffffffffffffffffffffffffffffffffff841660009081526012602052604081204391613645600187613b81565b815260200190815260200160002060000154145b156136a95773ffffffffffffffffffffffffffffffffffffffff841660009081526012602052604081208291613690600187613b81565b8152602081019190915260400160002060010155613727565b604080518082018252438152602080820184815273ffffffffffffffffffffffffffffffffffffffff8816600090815260128352848120888252909252929020905181559051600191820155613700908490613b42565b73ffffffffffffffffffffffffffffffffffffffff85166000908152601360205260409020555b604080518381526020810183905273ffffffffffffffffffffffffffffffffffffffff8616917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a250505050565b60606109e883836000846000808573ffffffffffffffffffffffffffffffffffffffff1684866040516137b19190613cb8565b60006040518083038185875af1925050503d80600081146137ee576040519150601f19603f3d011682016040523d82523d6000602084013e6137f3565b606091505b509150915061380386838361380d565b9695505050505050565b6060826138225761381d8261389c565b6109e8565b8151158015613846575073ffffffffffffffffffffffffffffffffffffffff84163b155b15613895576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161102d565b50806109e8565b8051156138ac5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811681146112ac57600080fd5b60006020828403121561391257600080fd5b81356109e8816138de565b80151581146112ac57600080fd5b60006020828403121561393d57600080fd5b81356109e88161391d565b6000806040838503121561395b57600080fd5b82359150602083013561396d8161391d565b809150509250929050565b6000806040838503121561398b57600080fd5b8235613996816138de565b946020939093013593505050565b6000602082840312156139b657600080fd5b5035919050565b6000602082840312156139cf57600080fd5b813563ffffffff811681146109e857600080fd5b6000806000606084860312156139f857600080fd5b8335613a03816138de565b92506020840135613a13816138de565b929592945050506040919091013590565b600080600060408486031215613a3957600080fd5b8335613a44816138de565b9250602084013567ffffffffffffffff811115613a6057600080fd5b8401601f81018613613a7157600080fd5b803567ffffffffffffffff811115613a8857600080fd5b8660208260061b8401011115613a9d57600080fd5b939660209190910195509293505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611b9357600080fd5b60008060408385031215613af157600080fd5b8235613afc816138de565b9150613b0a60208401613aae565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561110957611109613b13565b73ffffffffffffffffffffffffffffffffffffffff818116838216019081111561110957611109613b13565b8181038181111561110957611109613b13565b600082613bca577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006040828403128015613c1157600080fd5b506040805190810167ffffffffffffffff81118282101715613c5c577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604052613c6883613aae565b81526020830135613c788161391d565b60208201529392505050565b808202811582820484141761110957611109613b13565b600060208284031215613cad57600080fd5b81516109e88161391d565b6000825160005b81811015613cd95760208186018101518583015201613cbf565b50600092019182525091905056fea2646970667358221220a638bf31cf2f76851a14da070a6501cdf3cbb3488593a5df2dc1bf24e405af8564736f6c634300081c0033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/abi/contracts/templegold/TempleTeleporter.sol/TempleTeleporter.json b/apps/dapp/abi/contracts/templegold/TempleTeleporter.sol/TempleTeleporter.json
new file mode 100644
index 000000000..aa3a115f5
--- /dev/null
+++ b/apps/dapp/abi/contracts/templegold/TempleTeleporter.sol/TempleTeleporter.json
@@ -0,0 +1,668 @@
+{
+ "_format": "hh-sol-artifact-1",
+ "contractName": "TempleTeleporter",
+ "sourceName": "contracts/templegold/TempleTeleporter.sol",
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_temple",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "_endpoint",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "target",
+ "type": "address"
+ }
+ ],
+ "name": "AddressEmptyCode",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "AddressInsufficientBalance",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "ExpectedNonZero",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "FailedInnerCall",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidAddress",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidDelegate",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "InvalidEndpointCall",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "LzTokenUnavailable",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ }
+ ],
+ "name": "NoPeer",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "msgValue",
+ "type": "uint256"
+ }
+ ],
+ "name": "NotEnoughNative",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "name": "OnlyEndpoint",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ }
+ ],
+ "name": "OnlyPeer",
+ "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": "address",
+ "name": "token",
+ "type": "address"
+ }
+ ],
+ "name": "SafeERC20FailedOperation",
+ "type": "error"
+ },
+ {
+ "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": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "peer",
+ "type": "bytes32"
+ }
+ ],
+ "name": "PeerSet",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint32",
+ "name": "dstEid",
+ "type": "uint32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "sender",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TempleTeleported",
+ "type": "event"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct Origin",
+ "name": "origin",
+ "type": "tuple"
+ }
+ ],
+ "name": "allowInitializePath",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "endpoint",
+ "outputs": [
+ {
+ "internalType": "contract ILayerZeroEndpointV2",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct Origin",
+ "name": "",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes",
+ "name": "",
+ "type": "bytes"
+ },
+ {
+ "internalType": "address",
+ "name": "_sender",
+ "type": "address"
+ }
+ ],
+ "name": "isComposeMsgSender",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint32",
+ "name": "srcEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "sender",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct Origin",
+ "name": "_origin",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "_guid",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_message",
+ "type": "bytes"
+ },
+ {
+ "internalType": "address",
+ "name": "_executor",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_extraData",
+ "type": "bytes"
+ }
+ ],
+ "name": "lzReceive",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "name": "nextNonce",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "oAppVersion",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "senderVersion",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "receiverVersion",
+ "type": "uint64"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "eid",
+ "type": "uint32"
+ }
+ ],
+ "name": "peers",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "peer",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_dstEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_options",
+ "type": "bytes"
+ }
+ ],
+ "name": "quote",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "nativeFee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lzTokenFee",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct MessagingFee",
+ "name": "fee",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_dstEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_message",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "_options",
+ "type": "bytes"
+ }
+ ],
+ "name": "quote",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "nativeFee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lzTokenFee",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct MessagingFee",
+ "name": "fee",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_delegate",
+ "type": "address"
+ }
+ ],
+ "name": "setDelegate",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "_eid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "_peer",
+ "type": "bytes32"
+ }
+ ],
+ "name": "setPeer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint32",
+ "name": "dstEid",
+ "type": "uint32"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "options",
+ "type": "bytes"
+ }
+ ],
+ "name": "teleport",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "guid",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nonce",
+ "type": "uint64"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "nativeFee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "lzTokenFee",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct MessagingFee",
+ "name": "fee",
+ "type": "tuple"
+ }
+ ],
+ "internalType": "struct MessagingReceipt",
+ "name": "receipt",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "temple",
+ "outputs": [
+ {
+ "internalType": "contract ITempleERC20Token",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+ ],
+ "bytecode": "0x60c060405234801561001057600080fd5b50604051611ac7380380611ac783398101604081905261002f9161017e565b80838181806001600160a01b03811661006257604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61006b81610112565b506001600160a01b03808316608052811661009957604051632d618d8160e21b815260040160405180910390fd5b60805160405163ca5eb5e160e01b81526001600160a01b0383811660048301529091169063ca5eb5e190602401600060405180830381600087803b1580156100e057600080fd5b505af11580156100f4573d6000803e3d6000fd5b5050506001600160a01b0390961660a052506101c195505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461017957600080fd5b919050565b60008060006060848603121561019357600080fd5b61019c84610162565b92506101aa60208501610162565b91506101b860408501610162565b90509250925092565b60805160a0516118a961021e600039600081816102a4015281816105f601526109b6015260008181610166015281816103b00152818161077901528181610b6f01528181610c5f01528181610d730152610e5d01526118a96000f3fe6080604052600436106100f35760003560e01c80638da5cb5b1161008a578063d65d28c311610059578063d65d28c314610321578063f2fde38b1461034e578063fccbe2201461036e578063ff7bd03d1461038e57600080fd5b80638da5cb5b1461026757806397cd9a3414610292578063bb0b6a53146102c6578063ca5eb5e11461030157600080fd5b8063715018a6116100c6578063715018a6146101ad5780637626be8c146101c25780637d25a05e146101e257806382413eac1461021b57600080fd5b806313137d65146100f857806317442b701461010d5780633400288b146101345780635e280f1114610154575b600080fd5b61010b6101063660046111db565b6103ae565b005b34801561011957600080fd5b50604080516001815260026020820152015b60405180910390f35b34801561014057600080fd5b5061010b61014f366004611297565b6104ad565b34801561016057600080fd5b506101887f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012b565b3480156101b957600080fd5b5061010b6104c3565b6101d56101d03660046112c1565b6104d7565b60405161012b9190611332565b3480156101ee57600080fd5b506102026101fd366004611297565b610723565b60405167ffffffffffffffff909116815260200161012b565b34801561022757600080fd5b50610257610236366004611375565b73ffffffffffffffffffffffffffffffffffffffff81163014949350505050565b604051901515815260200161012b565b34801561027357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610188565b34801561029e57600080fd5b506101887f000000000000000000000000000000000000000000000000000000000000000081565b3480156102d257600080fd5b506102f36102e13660046113dc565b60016020526000908152604090205481565b60405190815260200161012b565b34801561030d57600080fd5b5061010b61031c3660046113f7565b61072c565b34801561032d57600080fd5b5061034161033c3660046114f0565b6107d8565b60405161012b919061155a565b34801561035a57600080fd5b5061010b6103693660046113f7565b61083b565b34801561037a57600080fd5b50610341610389366004611571565b61089f565b34801561039a57600080fd5b506102576103a93660046115ea565b6108ca565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163314610424576040517f91ac5e4f0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6020870180359061043e90610439908a6113dc565b610900565b146104955761045060208801886113dc565b6040517fc26bebcc00000000000000000000000000000000000000000000000000000000815263ffffffff90911660048201526020880135602482015260440161041b565b6104a487878787878787610955565b50505050505050565b6104b5610a1f565b6104bf8282610a72565b5050565b6104cb610a1f565b6104d56000610ac7565b565b6104df611110565b83600003610519576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516610566576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff86166040805160208101929092528101869052606001604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152908290527f79cc67900000000000000000000000000000000000000000000000000000000082523360048301526024820187905291507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906379cc679090604401600060405180830381600087803b15801561064f57600080fd5b505af1158015610663573d6000803e3d6000fd5b50506040805163ffffffff8b1681526020810189905273ffffffffffffffffffffffffffffffffffffffff8a1693503392507f54c4a194b05dc181761d873dfa15d370b0836fb76e18164f589b71d591c7a73a910160405180910390a3610718878286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052506040805180820190915234815260208101919091529250339150610b3c9050565b979650505050505050565b60005b92915050565b610734610a1f565b6040517fca5eb5e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e190602401600060405180830381600087803b1580156107bd57600080fd5b505af11580156107d1573d6000803e3d6000fd5b5050505050565b60408051808201909152600080825260208201526108328573ffffffffffffffffffffffffffffffffffffffff86166040805160208101929092528101869052606001604051602081830303815290604052846000610c49565b95945050505050565b610843610a1f565b73ffffffffffffffffffffffffffffffffffffffff8116610893576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161041b565b61089c81610ac7565b50565b60408051808201909152600080825260208201526108c08484846000610c49565b90505b9392505050565b60006020820180359060019083906108e290866113dc565b63ffffffff1681526020810191909152604001600020541492915050565b63ffffffff811660009081526001602052604081205480610726576040517ff6ff4fb700000000000000000000000000000000000000000000000000000000815263ffffffff8416600482015260240161041b565b60008061096486880188611606565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152602482018390529294509092507f0000000000000000000000000000000000000000000000000000000000000000909116906340c10f1990604401600060405180830381600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b50505050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104d5576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161041b565b63ffffffff8216600081815260016020908152604091829020849055815192835282018390527f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b910160405180910390a15050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610b44611110565b6000610b538460000151610d2e565b602085015190915015610b6d57610b6d8460200151610d6f565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632637a450826040518060a001604052808b63ffffffff168152602001610bca8c610900565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b8152600401610c06929190611692565b60806040518083038185885af1158015610c24573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107189190611785565b60408051808201909152600080825260208201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddc28c586040518060a001604052808863ffffffff168152602001610cb989610900565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b8152600401610cee929190611692565b6040805180830381865afa158015610d0a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083291906117fc565b6000813414610d6b576040517f9f70412000000000000000000000000000000000000000000000000000000000815234600482015260240161041b565b5090565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e009190611818565b905073ffffffffffffffffffffffffffffffffffffffff8116610e4f576040517f5373352a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805133602482018190527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff818116604485015260648085018890528551808603909101815260849094019094526020830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526104bf938516928690610f0f908590610f15565b50505050565b6000610f3773ffffffffffffffffffffffffffffffffffffffff841683610fb0565b90508051600014158015610f5c575080806020019051810190610f5a9190611835565b155b15610fab576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260240161041b565b505050565b60606108c383836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051610fe39190611857565b60006040518083038185875af1925050503d8060008114611020576040519150601f19603f3d011682016040523d82523d6000602084013e611025565b606091505b509150915061103586838361103f565b9695505050505050565b6060826110545761104f826110ce565b6108c3565b8151158015611078575073ffffffffffffffffffffffffffffffffffffffff84163b155b156110c7576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161041b565b50806108c3565b8051156110de5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806060016040528060008019168152602001600067ffffffffffffffff168152602001611153604051806040016040528060008152602001600081525090565b905290565b60006060828403121561116a57600080fd5b50919050565b60008083601f84011261118257600080fd5b50813567ffffffffffffffff81111561119a57600080fd5b6020830191508360208285010111156111b257600080fd5b9250929050565b73ffffffffffffffffffffffffffffffffffffffff8116811461089c57600080fd5b600080600080600080600060e0888a0312156111f657600080fd5b6112008989611158565b965060608801359550608088013567ffffffffffffffff81111561122357600080fd5b61122f8a828b01611170565b90965094505060a0880135611243816111b9565b925060c088013567ffffffffffffffff81111561125f57600080fd5b61126b8a828b01611170565b989b979a50959850939692959293505050565b803563ffffffff8116811461129257600080fd5b919050565b600080604083850312156112aa57600080fd5b6112b38361127e565b946020939093013593505050565b6000806000806000608086880312156112d957600080fd5b6112e28661127e565b945060208601356112f2816111b9565b935060408601359250606086013567ffffffffffffffff81111561131557600080fd5b61132188828901611170565b969995985093965092949392505050565b60006080820190508251825267ffffffffffffffff6020840151166020830152604083015161136e604084018280518252602090810151910152565b5092915050565b60008060008060a0858703121561138b57600080fd5b6113958686611158565b9350606085013567ffffffffffffffff8111156113b157600080fd5b6113bd87828801611170565b90945092505060808501356113d1816111b9565b939692955090935050565b6000602082840312156113ee57600080fd5b6108c38261127e565b60006020828403121561140957600080fd5b81356108c3816111b9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261145457600080fd5b813567ffffffffffffffff81111561146e5761146e611414565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff811182821017156114bb576114bb611414565b6040528181528382016020018510156114d357600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561150657600080fd5b61150f8561127e565b9350602085013561151f816111b9565b925060408501359150606085013567ffffffffffffffff81111561154257600080fd5b61154e87828801611443565b91505092959194509250565b815181526020808301519082015260408101610726565b60008060006060848603121561158657600080fd5b61158f8461127e565b9250602084013567ffffffffffffffff8111156115ab57600080fd5b6115b786828701611443565b925050604084013567ffffffffffffffff8111156115d457600080fd5b6115e086828701611443565b9150509250925092565b6000606082840312156115fc57600080fd5b6108c38383611158565b6000806040838503121561161957600080fd5b82356112b3816111b9565b60005b8381101561163f578181015183820152602001611627565b50506000910152565b60008151808452611660816020860160208601611624565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a060808401526116c860e0840182611648565b905060608501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08483030160a08501526117038282611648565b60809690960151151560c085015250505073ffffffffffffffffffffffffffffffffffffffff9190911660209091015290565b60006040828403121561174857600080fd5b6040805190810167ffffffffffffffff8111828210171561176b5761176b611414565b604052825181526020928301519281019290925250919050565b6000608082840312801561179857600080fd5b506040516060810167ffffffffffffffff811182821017156117bc576117bc611414565b60405282518152602083015167ffffffffffffffff811681146117de57600080fd5b60208201526117f08460408501611736565b60408201529392505050565b60006040828403121561180e57600080fd5b6108c38383611736565b60006020828403121561182a57600080fd5b81516108c3816111b9565b60006020828403121561184757600080fd5b815180151581146108c357600080fd5b60008251611869818460208701611624565b919091019291505056fea264697066735822122043f7196bebff6dfdd5193b0693b6b9e994957a28c8366b11af22819c57c168f664736f6c634300081c0033",
+ "deployedBytecode": "0x6080604052600436106100f35760003560e01c80638da5cb5b1161008a578063d65d28c311610059578063d65d28c314610321578063f2fde38b1461034e578063fccbe2201461036e578063ff7bd03d1461038e57600080fd5b80638da5cb5b1461026757806397cd9a3414610292578063bb0b6a53146102c6578063ca5eb5e11461030157600080fd5b8063715018a6116100c6578063715018a6146101ad5780637626be8c146101c25780637d25a05e146101e257806382413eac1461021b57600080fd5b806313137d65146100f857806317442b701461010d5780633400288b146101345780635e280f1114610154575b600080fd5b61010b6101063660046111db565b6103ae565b005b34801561011957600080fd5b50604080516001815260026020820152015b60405180910390f35b34801561014057600080fd5b5061010b61014f366004611297565b6104ad565b34801561016057600080fd5b506101887f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012b565b3480156101b957600080fd5b5061010b6104c3565b6101d56101d03660046112c1565b6104d7565b60405161012b9190611332565b3480156101ee57600080fd5b506102026101fd366004611297565b610723565b60405167ffffffffffffffff909116815260200161012b565b34801561022757600080fd5b50610257610236366004611375565b73ffffffffffffffffffffffffffffffffffffffff81163014949350505050565b604051901515815260200161012b565b34801561027357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610188565b34801561029e57600080fd5b506101887f000000000000000000000000000000000000000000000000000000000000000081565b3480156102d257600080fd5b506102f36102e13660046113dc565b60016020526000908152604090205481565b60405190815260200161012b565b34801561030d57600080fd5b5061010b61031c3660046113f7565b61072c565b34801561032d57600080fd5b5061034161033c3660046114f0565b6107d8565b60405161012b919061155a565b34801561035a57600080fd5b5061010b6103693660046113f7565b61083b565b34801561037a57600080fd5b50610341610389366004611571565b61089f565b34801561039a57600080fd5b506102576103a93660046115ea565b6108ca565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163314610424576040517f91ac5e4f0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6020870180359061043e90610439908a6113dc565b610900565b146104955761045060208801886113dc565b6040517fc26bebcc00000000000000000000000000000000000000000000000000000000815263ffffffff90911660048201526020880135602482015260440161041b565b6104a487878787878787610955565b50505050505050565b6104b5610a1f565b6104bf8282610a72565b5050565b6104cb610a1f565b6104d56000610ac7565b565b6104df611110565b83600003610519576040517f54db0c8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516610566576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff86166040805160208101929092528101869052606001604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152908290527f79cc67900000000000000000000000000000000000000000000000000000000082523360048301526024820187905291507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906379cc679090604401600060405180830381600087803b15801561064f57600080fd5b505af1158015610663573d6000803e3d6000fd5b50506040805163ffffffff8b1681526020810189905273ffffffffffffffffffffffffffffffffffffffff8a1693503392507f54c4a194b05dc181761d873dfa15d370b0836fb76e18164f589b71d591c7a73a910160405180910390a3610718878286868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052506040805180820190915234815260208101919091529250339150610b3c9050565b979650505050505050565b60005b92915050565b610734610a1f565b6040517fca5eb5e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e190602401600060405180830381600087803b1580156107bd57600080fd5b505af11580156107d1573d6000803e3d6000fd5b5050505050565b60408051808201909152600080825260208201526108328573ffffffffffffffffffffffffffffffffffffffff86166040805160208101929092528101869052606001604051602081830303815290604052846000610c49565b95945050505050565b610843610a1f565b73ffffffffffffffffffffffffffffffffffffffff8116610893576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161041b565b61089c81610ac7565b50565b60408051808201909152600080825260208201526108c08484846000610c49565b90505b9392505050565b60006020820180359060019083906108e290866113dc565b63ffffffff1681526020810191909152604001600020541492915050565b63ffffffff811660009081526001602052604081205480610726576040517ff6ff4fb700000000000000000000000000000000000000000000000000000000815263ffffffff8416600482015260240161041b565b60008061096486880188611606565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8084166004830152602482018390529294509092507f0000000000000000000000000000000000000000000000000000000000000000909116906340c10f1990604401600060405180830381600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b50505050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146104d5576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161041b565b63ffffffff8216600081815260016020908152604091829020849055815192835282018390527f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b910160405180910390a15050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610b44611110565b6000610b538460000151610d2e565b602085015190915015610b6d57610b6d8460200151610d6f565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632637a450826040518060a001604052808b63ffffffff168152602001610bca8c610900565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b8152600401610c06929190611692565b60806040518083038185885af1158015610c24573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107189190611785565b60408051808201909152600080825260208201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ddc28c586040518060a001604052808863ffffffff168152602001610cb989610900565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b8152600401610cee929190611692565b6040805180830381865afa158015610d0a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083291906117fc565b6000813414610d6b576040517f9f70412000000000000000000000000000000000000000000000000000000000815234600482015260240161041b565b5090565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e009190611818565b905073ffffffffffffffffffffffffffffffffffffffff8116610e4f576040517f5373352a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805133602482018190527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff818116604485015260648085018890528551808603909101815260849094019094526020830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526104bf938516928690610f0f908590610f15565b50505050565b6000610f3773ffffffffffffffffffffffffffffffffffffffff841683610fb0565b90508051600014158015610f5c575080806020019051810190610f5a9190611835565b155b15610fab576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260240161041b565b505050565b60606108c383836000846000808573ffffffffffffffffffffffffffffffffffffffff168486604051610fe39190611857565b60006040518083038185875af1925050503d8060008114611020576040519150601f19603f3d011682016040523d82523d6000602084013e611025565b606091505b509150915061103586838361103f565b9695505050505050565b6060826110545761104f826110ce565b6108c3565b8151158015611078575073ffffffffffffffffffffffffffffffffffffffff84163b155b156110c7576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161041b565b50806108c3565b8051156110de5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806060016040528060008019168152602001600067ffffffffffffffff168152602001611153604051806040016040528060008152602001600081525090565b905290565b60006060828403121561116a57600080fd5b50919050565b60008083601f84011261118257600080fd5b50813567ffffffffffffffff81111561119a57600080fd5b6020830191508360208285010111156111b257600080fd5b9250929050565b73ffffffffffffffffffffffffffffffffffffffff8116811461089c57600080fd5b600080600080600080600060e0888a0312156111f657600080fd5b6112008989611158565b965060608801359550608088013567ffffffffffffffff81111561122357600080fd5b61122f8a828b01611170565b90965094505060a0880135611243816111b9565b925060c088013567ffffffffffffffff81111561125f57600080fd5b61126b8a828b01611170565b989b979a50959850939692959293505050565b803563ffffffff8116811461129257600080fd5b919050565b600080604083850312156112aa57600080fd5b6112b38361127e565b946020939093013593505050565b6000806000806000608086880312156112d957600080fd5b6112e28661127e565b945060208601356112f2816111b9565b935060408601359250606086013567ffffffffffffffff81111561131557600080fd5b61132188828901611170565b969995985093965092949392505050565b60006080820190508251825267ffffffffffffffff6020840151166020830152604083015161136e604084018280518252602090810151910152565b5092915050565b60008060008060a0858703121561138b57600080fd5b6113958686611158565b9350606085013567ffffffffffffffff8111156113b157600080fd5b6113bd87828801611170565b90945092505060808501356113d1816111b9565b939692955090935050565b6000602082840312156113ee57600080fd5b6108c38261127e565b60006020828403121561140957600080fd5b81356108c3816111b9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261145457600080fd5b813567ffffffffffffffff81111561146e5761146e611414565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff811182821017156114bb576114bb611414565b6040528181528382016020018510156114d357600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561150657600080fd5b61150f8561127e565b9350602085013561151f816111b9565b925060408501359150606085013567ffffffffffffffff81111561154257600080fd5b61154e87828801611443565b91505092959194509250565b815181526020808301519082015260408101610726565b60008060006060848603121561158657600080fd5b61158f8461127e565b9250602084013567ffffffffffffffff8111156115ab57600080fd5b6115b786828701611443565b925050604084013567ffffffffffffffff8111156115d457600080fd5b6115e086828701611443565b9150509250925092565b6000606082840312156115fc57600080fd5b6108c38383611158565b6000806040838503121561161957600080fd5b82356112b3816111b9565b60005b8381101561163f578181015183820152602001611627565b50506000910152565b60008151808452611660816020860160208601611624565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a060808401526116c860e0840182611648565b905060608501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08483030160a08501526117038282611648565b60809690960151151560c085015250505073ffffffffffffffffffffffffffffffffffffffff9190911660209091015290565b60006040828403121561174857600080fd5b6040805190810167ffffffffffffffff8111828210171561176b5761176b611414565b604052825181526020928301519281019290925250919050565b6000608082840312801561179857600080fd5b506040516060810167ffffffffffffffff811182821017156117bc576117bc611414565b60405282518152602083015167ffffffffffffffff811681146117de57600080fd5b60208201526117f08460408501611736565b60408201529392505050565b60006040828403121561180e57600080fd5b6108c38383611736565b60006020828403121561182a57600080fd5b81516108c3816111b9565b60006020828403121561184757600080fd5b815180151581146108c357600080fd5b60008251611869818460208701611624565b919091019291505056fea264697066735822122043f7196bebff6dfdd5193b0693b6b9e994957a28c8366b11af22819c57c168f664736f6c634300081c0033",
+ "linkReferences": {},
+ "deployedLinkReferences": {}
+}
diff --git a/apps/dapp/package.json b/apps/dapp/package.json
index d630b4ce9..ee4ffad3d 100644
--- a/apps/dapp/package.json
+++ b/apps/dapp/package.json
@@ -21,7 +21,6 @@
},
"dependencies": {
"@balancer-labs/sdk": "^1.1.6",
- "@cowprotocol/widget-react": "^0.12.0",
"@safe-global/safe-apps-provider": "^0.18.0",
"@safe-global/safe-apps-sdk": "^8.1.0",
"@safe-global/safe-core-sdk-types": "2.3.0",
@@ -53,8 +52,7 @@
"tippy.js": "^6.3.7",
"use-debounce": "^9.0.2",
"use-interval": "^1.4.0",
- "util": "^0.12.4",
- "zod": "^3.19.1"
+ "util": "^0.12.4"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -96,5 +94,6 @@
"typescript": "^5.5.4",
"vite": "^5.2.10",
"vite-plugin-svgr": "^4.2.0"
- }
+ },
+ "packageManager": "yarn@1.22.21"
}
diff --git a/apps/dapp/src/assets/icons/Dai.svg b/apps/dapp/src/assets/icons/Dai.svg
new file mode 100644
index 000000000..a5a2647df
--- /dev/null
+++ b/apps/dapp/src/assets/icons/Dai.svg
@@ -0,0 +1,9 @@
+
diff --git a/apps/dapp/src/assets/icons/active.svg b/apps/dapp/src/assets/icons/active.svg
new file mode 100644
index 000000000..2fbb03c9b
--- /dev/null
+++ b/apps/dapp/src/assets/icons/active.svg
@@ -0,0 +1,231 @@
+
diff --git a/apps/dapp/src/assets/icons/arbitrum.svg b/apps/dapp/src/assets/icons/arbitrum.svg
new file mode 100644
index 000000000..fb799add6
--- /dev/null
+++ b/apps/dapp/src/assets/icons/arbitrum.svg
@@ -0,0 +1,14 @@
+
diff --git a/apps/dapp/src/assets/icons/box.svg b/apps/dapp/src/assets/icons/box.svg
new file mode 100644
index 000000000..022df10f6
--- /dev/null
+++ b/apps/dapp/src/assets/icons/box.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/check.svg b/apps/dapp/src/assets/icons/check.svg
new file mode 100644
index 000000000..4ebbe4852
--- /dev/null
+++ b/apps/dapp/src/assets/icons/check.svg
@@ -0,0 +1,10 @@
+
diff --git a/apps/dapp/src/assets/icons/checkbox-square.svg b/apps/dapp/src/assets/icons/checkbox-square.svg
new file mode 100644
index 000000000..022df10f6
--- /dev/null
+++ b/apps/dapp/src/assets/icons/checkbox-square.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/checkbox.svg b/apps/dapp/src/assets/icons/checkbox.svg
new file mode 100644
index 000000000..c27455311
--- /dev/null
+++ b/apps/dapp/src/assets/icons/checkbox.svg
@@ -0,0 +1,24 @@
+
diff --git a/apps/dapp/src/assets/icons/checkmark-in-box.svg b/apps/dapp/src/assets/icons/checkmark-in-box.svg
new file mode 100644
index 000000000..78de80e68
--- /dev/null
+++ b/apps/dapp/src/assets/icons/checkmark-in-box.svg
@@ -0,0 +1,4 @@
+
diff --git a/apps/dapp/src/assets/icons/checkmark.svg b/apps/dapp/src/assets/icons/checkmark.svg
new file mode 100644
index 000000000..0ea00e712
--- /dev/null
+++ b/apps/dapp/src/assets/icons/checkmark.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/apps/dapp/src/assets/icons/chevron_left.svg b/apps/dapp/src/assets/icons/chevron_left.svg
new file mode 100644
index 000000000..c8d6a1430
--- /dev/null
+++ b/apps/dapp/src/assets/icons/chevron_left.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/chevron_right.svg b/apps/dapp/src/assets/icons/chevron_right.svg
new file mode 100644
index 000000000..f15885d52
--- /dev/null
+++ b/apps/dapp/src/assets/icons/chevron_right.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/circle.svg b/apps/dapp/src/assets/icons/circle.svg
new file mode 100644
index 000000000..cca71b68f
--- /dev/null
+++ b/apps/dapp/src/assets/icons/circle.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/close.svg b/apps/dapp/src/assets/icons/close.svg
new file mode 100644
index 000000000..e2ed52d38
--- /dev/null
+++ b/apps/dapp/src/assets/icons/close.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/expand_more.svg b/apps/dapp/src/assets/icons/expand_more.svg
new file mode 100644
index 000000000..00b19434f
--- /dev/null
+++ b/apps/dapp/src/assets/icons/expand_more.svg
@@ -0,0 +1,10 @@
+
diff --git a/apps/dapp/src/assets/icons/first_page.svg b/apps/dapp/src/assets/icons/first_page.svg
new file mode 100644
index 000000000..cb6534e17
--- /dev/null
+++ b/apps/dapp/src/assets/icons/first_page.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/info.svg b/apps/dapp/src/assets/icons/info.svg
new file mode 100644
index 000000000..a8da3e3ff
--- /dev/null
+++ b/apps/dapp/src/assets/icons/info.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/last_page.svg b/apps/dapp/src/assets/icons/last_page.svg
new file mode 100644
index 000000000..f9bdf2f1c
--- /dev/null
+++ b/apps/dapp/src/assets/icons/last_page.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/live-gold-auction.svg b/apps/dapp/src/assets/icons/live-gold-auction.svg
new file mode 100644
index 000000000..c8908fd0d
--- /dev/null
+++ b/apps/dapp/src/assets/icons/live-gold-auction.svg
@@ -0,0 +1,9 @@
+
diff --git a/apps/dapp/src/assets/icons/priority-high.svg b/apps/dapp/src/assets/icons/priority-high.svg
new file mode 100644
index 000000000..000918b85
--- /dev/null
+++ b/apps/dapp/src/assets/icons/priority-high.svg
@@ -0,0 +1,20 @@
+
diff --git a/apps/dapp/src/assets/icons/scheduled.svg b/apps/dapp/src/assets/icons/scheduled.svg
new file mode 100644
index 000000000..b17be6492
--- /dev/null
+++ b/apps/dapp/src/assets/icons/scheduled.svg
@@ -0,0 +1,206 @@
+
diff --git a/apps/dapp/src/assets/icons/selector.svg b/apps/dapp/src/assets/icons/selector.svg
new file mode 100644
index 000000000..7d000b206
--- /dev/null
+++ b/apps/dapp/src/assets/icons/selector.svg
@@ -0,0 +1,36 @@
+
diff --git a/apps/dapp/src/assets/icons/stake-temple.svg b/apps/dapp/src/assets/icons/stake-temple.svg
new file mode 100644
index 000000000..397f12d68
--- /dev/null
+++ b/apps/dapp/src/assets/icons/stake-temple.svg
@@ -0,0 +1,11 @@
+
diff --git a/apps/dapp/src/assets/icons/storefront.svg b/apps/dapp/src/assets/icons/storefront.svg
new file mode 100644
index 000000000..dd3ec51d2
--- /dev/null
+++ b/apps/dapp/src/assets/icons/storefront.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/assets/icons/temple-gold.svg b/apps/dapp/src/assets/icons/temple-gold.svg
new file mode 100644
index 000000000..992c0aa01
--- /dev/null
+++ b/apps/dapp/src/assets/icons/temple-gold.svg
@@ -0,0 +1,7 @@
+
diff --git a/apps/dapp/src/assets/icons/usds.svg b/apps/dapp/src/assets/icons/usds.svg
new file mode 100644
index 000000000..25df90674
--- /dev/null
+++ b/apps/dapp/src/assets/icons/usds.svg
@@ -0,0 +1,9 @@
+
diff --git a/apps/dapp/src/assets/icons/wallet.svg b/apps/dapp/src/assets/icons/wallet.svg
new file mode 100644
index 000000000..cf98643a9
--- /dev/null
+++ b/apps/dapp/src/assets/icons/wallet.svg
@@ -0,0 +1,4 @@
+
diff --git a/apps/dapp/src/assets/images/all-spices.svg b/apps/dapp/src/assets/images/all-spices.svg
new file mode 100644
index 000000000..314eae869
--- /dev/null
+++ b/apps/dapp/src/assets/images/all-spices.svg
@@ -0,0 +1,457 @@
+
diff --git a/apps/dapp/src/assets/images/earn-circle-left-mobile.svg b/apps/dapp/src/assets/images/earn-circle-left-mobile.svg
new file mode 100644
index 000000000..c54ba6c23
--- /dev/null
+++ b/apps/dapp/src/assets/images/earn-circle-left-mobile.svg
@@ -0,0 +1,40 @@
+
diff --git a/apps/dapp/src/assets/images/earn-circle-left.svg b/apps/dapp/src/assets/images/earn-circle-left.svg
new file mode 100644
index 000000000..69861227a
--- /dev/null
+++ b/apps/dapp/src/assets/images/earn-circle-left.svg
@@ -0,0 +1,44 @@
+
diff --git a/apps/dapp/src/assets/images/earn-circle-right.svg b/apps/dapp/src/assets/images/earn-circle-right.svg
new file mode 100644
index 000000000..6de1cd0f5
--- /dev/null
+++ b/apps/dapp/src/assets/images/earn-circle-right.svg
@@ -0,0 +1,49 @@
+
diff --git a/apps/dapp/src/assets/images/gold-auctions.svg b/apps/dapp/src/assets/images/gold-auctions.svg
new file mode 100644
index 000000000..6f72f404d
--- /dev/null
+++ b/apps/dapp/src/assets/images/gold-auctions.svg
@@ -0,0 +1,1178 @@
+
diff --git a/apps/dapp/src/assets/images/spice-all-spices.svg b/apps/dapp/src/assets/images/spice-all-spices.svg
new file mode 100644
index 000000000..de0a573dc
--- /dev/null
+++ b/apps/dapp/src/assets/images/spice-all-spices.svg
@@ -0,0 +1,457 @@
+
diff --git a/apps/dapp/src/assets/images/spice-bazaar.svg b/apps/dapp/src/assets/images/spice-bazaar.svg
new file mode 100644
index 000000000..fa01cb65f
--- /dev/null
+++ b/apps/dapp/src/assets/images/spice-bazaar.svg
@@ -0,0 +1,502 @@
+
diff --git a/apps/dapp/src/assets/images/spice1.svg b/apps/dapp/src/assets/images/spice1.svg
new file mode 100644
index 000000000..4983cab1d
--- /dev/null
+++ b/apps/dapp/src/assets/images/spice1.svg
@@ -0,0 +1,38 @@
+
diff --git a/apps/dapp/src/assets/images/spice2.svg b/apps/dapp/src/assets/images/spice2.svg
new file mode 100644
index 000000000..029b4fe5c
--- /dev/null
+++ b/apps/dapp/src/assets/images/spice2.svg
@@ -0,0 +1,60 @@
+
diff --git a/apps/dapp/src/assets/images/spice3.svg b/apps/dapp/src/assets/images/spice3.svg
new file mode 100644
index 000000000..5532e251e
--- /dev/null
+++ b/apps/dapp/src/assets/images/spice3.svg
@@ -0,0 +1,60 @@
+
diff --git a/apps/dapp/src/assets/images/spice4.svg b/apps/dapp/src/assets/images/spice4.svg
new file mode 100644
index 000000000..8122f8339
--- /dev/null
+++ b/apps/dapp/src/assets/images/spice4.svg
@@ -0,0 +1,324 @@
+
diff --git a/apps/dapp/src/assets/images/stake-temple.svg b/apps/dapp/src/assets/images/stake-temple.svg
new file mode 100644
index 000000000..5f3dcd903
--- /dev/null
+++ b/apps/dapp/src/assets/images/stake-temple.svg
@@ -0,0 +1,2408 @@
+
diff --git a/apps/dapp/src/assets/images/temple-dao-logo.svg b/apps/dapp/src/assets/images/temple-dao-logo.svg
new file mode 100644
index 000000000..b341a2316
--- /dev/null
+++ b/apps/dapp/src/assets/images/temple-dao-logo.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/dapp/src/components/Button/Button.tsx b/apps/dapp/src/components/Button/Button.tsx
index e37e044f1..8d3f7a61c 100644
--- a/apps/dapp/src/components/Button/Button.tsx
+++ b/apps/dapp/src/components/Button/Button.tsx
@@ -3,7 +3,6 @@ import Image from 'components/Image/Image';
import styled, { css } from 'styled-components';
import Loader from '../Loader/Loader';
-import useIsMounted from 'hooks/use-is-mounted';
export interface ButtonProps
extends ButtonStyledProps,
@@ -31,7 +30,6 @@ export const Button = ({
...props
}: ButtonProps) => {
const [isLoading, setIsLoading] = useState(false);
- const isMounted = useIsMounted();
/**
* Click handler which shows a spinner while the action is in progress.
@@ -57,12 +55,6 @@ export const Button = ({
console.info(`Error: ${JSON.stringify(err, null, 2)}`);
}
} finally {
- // Make sure the component is still mounted after async code.
- // setting state on an unmounted component is a memory leak.
- if (!isMounted.current) {
- return;
- }
-
setIsLoading(false);
}
};
diff --git a/apps/dapp/src/components/Layouts/V2Layout/index.tsx b/apps/dapp/src/components/Layouts/V2Layout/index.tsx
index 9ee67963e..2f0178985 100644
--- a/apps/dapp/src/components/Layouts/V2Layout/index.tsx
+++ b/apps/dapp/src/components/Layouts/V2Layout/index.tsx
@@ -14,6 +14,7 @@ import CurrencyExchange from 'assets/icons/currency_exchange.svg?react';
import Payments from 'assets/icons/payments.svg?react';
import Candle from 'assets/icons/candle.svg?react';
import Restore from 'assets/icons/restore.svg?react';
+import StoreFront from 'assets/icons/storefront.svg?react';
import { useGeoBlocked } from 'hooks/use-geo-blocked';
import GeoblockModal from 'components/Popover/GeoblockModal';
@@ -32,6 +33,8 @@ enum V2DashboardLocPaths {
Trade = '/dapp/trade',
Trv = '/dapp/dashboard/treasuryreservesvault',
Borrow = '/dapp/borrow',
+ SpiceBazaar = '/dapp/spice',
+ Ohmage = '/dapp/ohmage',
Legacy = '/dapp/legacy',
}
@@ -62,6 +65,18 @@ const V2Layout = () => {
Logo: Payments,
selected: V2DashboardLocPaths.Borrow === loc.pathname,
},
+ {
+ label: 'Spice Bazaar',
+ linkTo: V2DashboardLocPaths.SpiceBazaar,
+ Logo: StoreFront,
+ selected: V2DashboardLocPaths.SpiceBazaar === loc.pathname,
+ },
+ {
+ label: 'Ohmage',
+ linkTo: V2DashboardLocPaths.Ohmage,
+ Logo: Candle,
+ selected: V2DashboardLocPaths.Ohmage === loc.pathname,
+ },
{
label: 'Legacy',
linkTo: V2DashboardLocPaths.Legacy,
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Borrow/Chart.tsx b/apps/dapp/src/components/Pages/Core/DappPages/Borrow/Chart.tsx
index fa4afd2bd..9cd7093a7 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Borrow/Chart.tsx
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Borrow/Chart.tsx
@@ -10,7 +10,7 @@ import {
formatNumberFixedDecimals,
} from 'utils/formatter';
import { formatDailyDataPoints } from 'utils/charts';
-import { queryTlcDailySnapshots, subgraphQuery } from 'utils/subgraph';
+import { fetchGenericSubgraph } from 'utils/subgraph';
import IntervalToggler from 'components/Charts/IntervalToggler';
import env from 'constants/env';
@@ -50,18 +50,17 @@ export const TlcChart = () => {
useEffect(() => {
const fetchMetrics = async () => {
- const response = await subgraphQuery(
+ const { data } = await fetchGenericSubgraph(
env.subgraph.templeV2,
- queryTlcDailySnapshots()
- );
-
- setMetrics(
- response.tlcDailySnapshots.map((r) => ({
- timestamp: parseFloat(r.timestamp),
- utilRatio: parseFloat(r.utilRatio),
- interestYield: parseFloat(r.interestYield),
- }))
+ `{
+ tlcDailySnapshots(orderBy: timestamp, orderDirection: desc) {
+ timestamp
+ utilRatio
+ interestYield
+ }
+ }`
);
+ setMetrics(data.tlcDailySnapshots);
};
fetchMetrics();
}, []);
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Borrow/TLC/Borrow.tsx b/apps/dapp/src/components/Pages/Core/DappPages/Borrow/TLC/Borrow.tsx
index d7c9b109f..0f5f6f756 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Borrow/TLC/Borrow.tsx
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Borrow/TLC/Borrow.tsx
@@ -20,7 +20,7 @@ import {
TlcInfo,
Warning,
} from '../index';
-import { fromAtto, toAtto, ZERO } from 'utils/bigNumber';
+import { fromAtto, toAtto } from 'utils/bigNumber';
import styled from 'styled-components';
import { ReactNode, useEffect, useMemo, useState } from 'react';
@@ -67,28 +67,18 @@ export const Borrow: React.FC = ({
const userMaxBorrowBigNumber = toAtto(userMaxBorrow);
- let returnValue = { value: userMaxBorrow, isCircuitBreakerActive: false };
-
- // Check if the dai circuit breaker is active
- if (
- tlcInfo &&
- tlcInfo.daiCircuitBreakerRemaining.lt(userMaxBorrowBigNumber)
- ) {
- returnValue = {
- value: fromAtto(tlcInfo.daiCircuitBreakerRemaining),
- isCircuitBreakerActive: true,
- };
+ if (!tlcInfo) {
+ return { value: userMaxBorrow, isCircuitBreakerActive: false };
}
- // Check if trvAvailable from the contract is less than the user max borrow
- if (tlcInfo && tlcInfo.trvAvailable.lt(userMaxBorrowBigNumber)) {
- returnValue = {
- value: fromAtto(tlcInfo.trvAvailable || ZERO),
+ if (tlcInfo.daiCircuitBreakerRemaining.lt(userMaxBorrowBigNumber)) {
+ return {
+ value: fromAtto(tlcInfo.daiCircuitBreakerRemaining),
isCircuitBreakerActive: true,
};
}
- return returnValue;
+ return { value: userMaxBorrow, isCircuitBreakerActive: false };
}, [tlcInfo, accountPosition, prices.tpi]);
return (
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Borrow/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/Borrow/index.tsx
index 01bce1b18..7604c7acc 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Borrow/index.tsx
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Borrow/index.tsx
@@ -10,11 +10,7 @@ import {
TreasuryReservesVault__factory,
} from 'types/typechain';
import { ITlcDataTypes } from 'types/typechain/contracts/interfaces/v2/templeLineOfCredit/ITempleLineOfCredit';
-import {
- queryTlcMinBorrowAmount,
- queryTlcPrices,
- subgraphQuery,
-} from 'utils/subgraph';
+import { fetchGenericSubgraph } from 'utils/subgraph';
import { BigNumber, ethers } from 'ethers';
import daiImg from 'assets/images/newui-images/tokens/dai.png';
import templeImg from 'assets/images/newui-images/tokens/temple.png';
@@ -32,7 +28,6 @@ import env from 'constants/env';
import { useConnectWallet } from '@web3-onboard/react';
import Tooltip from 'components/Tooltip/Tooltip';
import { estimateAndMine } from 'utils/ethers';
-import { aprToApy } from 'utils/helpers';
export type State = {
supplyValue: string;
@@ -53,8 +48,6 @@ export type TlcInfo = {
debtCeiling: number;
daiCircuitBreakerRemaining: BigNumber;
templeCircuitBreakerRemaining: BigNumber;
- outstandingUserDebt: number;
- trvAvailable: BigNumber;
};
export const MAX_LTV = 85;
@@ -93,18 +86,23 @@ export const BorrowPage = () => {
const [metricsLoading, setMetricsLoading] = useState(false);
const getPrices = useCallback(async () => {
- const response = await subgraphQuery(
+ const { data } = await fetchGenericSubgraph(
env.subgraph.templeV2,
- queryTlcPrices()
+ `{
+ tokens {
+ price
+ symbol
+ }
+ treasuryReservesVaults {
+ treasuryPriceIndex
+ }
+ }`
);
setPrices({
- templePrice: parseFloat(
- response.tokens.filter((t: any) => t.symbol == 'TEMPLE')[0].price
- ),
- daiPrice: parseFloat(
- response.tokens.filter((t: any) => t.symbol == 'DAI')[0].price
- ),
- tpi: parseFloat(response.treasuryReservesVaults[0].treasuryPriceIndex),
+ templePrice: data.tokens.filter((t: any) => t.symbol == 'TEMPLE')[0]
+ .price,
+ daiPrice: data.tokens.filter((t: any) => t.symbol == 'DAI')[0].price,
+ tpi: data.treasuryReservesVaults[0].treasuryPriceIndex,
});
}, []);
@@ -150,7 +148,6 @@ export const BorrowPage = () => {
const debtPosition = await tlcContract.totalDebtPosition();
const totalUserDebt = debtPosition.totalDebt;
const utilizationRatio = debtPosition.utilizationRatio;
- const outstandingUserDebt = debtPosition[2];
// NOTE: We are intentionally rounding here to nearest 1e18
const debtCeiling = totalUserDebt
@@ -162,9 +159,6 @@ export const BorrowPage = () => {
const trvContract = new TreasuryReservesVault__factory(signer).attach(
env.contracts.treasuryReservesVault
);
-
- const trvAvailable = await trvContract.totalAvailable(env.contracts.dai);
-
const strategyAvailalableToBorrowFromTrv =
await trvContract.availableForStrategyToBorrow(
env.contracts.strategies.tlcStrategy,
@@ -185,9 +179,8 @@ export const BorrowPage = () => {
const maxLtv = debtTokenConfig.maxLtvRatio;
// current borrow apy
- const currentBorrowInterestRate = aprToApy(
- fromAtto(debtTokenData.interestRate)
- );
+ const currentBorrowInterestRate =
+ Math.pow(1 + fromAtto(debtTokenData.interestRate) / 365, 365) - 1;
const circuitBreakers = await getCircuitBreakers();
@@ -196,8 +189,6 @@ export const BorrowPage = () => {
strategyBalance: fromAtto(maxAvailableToBorrow),
borrowRate: currentBorrowInterestRate,
liquidationLtv: fromAtto(maxLtv),
- outstandingUserDebt: fromAtto(outstandingUserDebt),
- trvAvailable: trvAvailable,
daiCircuitBreakerRemaining: circuitBreakers?.daiCircuitBreakerRemaining,
templeCircuitBreakerRemaining:
circuitBreakers?.templeCircuitBreakerRemaining,
@@ -219,9 +210,13 @@ export const BorrowPage = () => {
};
getAccountPosition();
try {
- const response = await subgraphQuery(
+ const { data } = await fetchGenericSubgraph(
env.subgraph.templeV2,
- queryTlcMinBorrowAmount()
+ `{
+ tlcDailySnapshots(orderBy: timestamp, orderDirection: desc, first: 1) {
+ minBorrowAmount
+ }
+ }`
);
const tlcInfoFromContracts = await getTlcInfoFromContracts();
@@ -235,7 +230,7 @@ export const BorrowPage = () => {
}
setTlcInfo({
- minBorrow: parseFloat(response.tlcDailySnapshots[0].minBorrowAmount),
+ minBorrow: data.tlcDailySnapshots[0].minBorrowAmount,
borrowRate: tlcInfoFromContracts?.borrowRate || 0,
liquidationLtv: tlcInfoFromContracts?.liquidationLtv || 0,
strategyBalance: tlcInfoFromContracts?.strategyBalance || 0,
@@ -244,8 +239,6 @@ export const BorrowPage = () => {
tlcInfoFromContracts?.daiCircuitBreakerRemaining || ZERO,
templeCircuitBreakerRemaining:
tlcInfoFromContracts?.templeCircuitBreakerRemaining || ZERO,
- outstandingUserDebt: tlcInfoFromContracts?.outstandingUserDebt || 0,
- trvAvailable: tlcInfoFromContracts?.trvAvailable || ZERO,
});
} catch (e) {
setMetricsLoading(false);
@@ -489,21 +482,14 @@ export const BorrowPage = () => {
if (!tlcInfo) return '...';
const availableAsBigNumber = toAtto(tlcInfo.strategyBalance);
- let borrowableAmount = tlcInfo.strategyBalance;
if (tlcInfo.daiCircuitBreakerRemaining.lt(availableAsBigNumber)) {
- borrowableAmount = fromAtto(tlcInfo.daiCircuitBreakerRemaining);
+ return `$${Number(
+ fromAtto(tlcInfo.daiCircuitBreakerRemaining)
+ ).toLocaleString()}`;
}
- const trvAvailable = fromAtto(tlcInfo.trvAvailable);
- if (trvAvailable < borrowableAmount) {
- borrowableAmount = trvAvailable;
- }
-
- return `$${Number(borrowableAmount).toLocaleString('en', {
- minimumFractionDigits: 2,
- maximumFractionDigits: 2,
- })}`;
+ return `$${Number(tlcInfo.strategyBalance).toLocaleString()}`;
}, [tlcInfo]);
return (
@@ -731,29 +717,10 @@ export const BorrowPage = () => {
Current Borrow APY
-
-
-
- {showLoading ? '...' : prices.tpi.toFixed(2)}
-
+ {showLoading ? '...' : prices.tpi}
Current TPI
-
-
- {showLoading
- ? '...'
- : tlcInfo &&
- `$${Number(tlcInfo.outstandingUserDebt).toLocaleString(
- 'en',
- {
- minimumFractionDigits: 2,
- maximumFractionDigits: 2,
- }
- )}`}
-
- Outstanding User Debt
-
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/Chart/V2StrategyMetricsChart.tsx b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/Chart/V2StrategyMetricsChart.tsx
index 54ee54d09..6d6965b47 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/Chart/V2StrategyMetricsChart.tsx
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/Chart/V2StrategyMetricsChart.tsx
@@ -7,14 +7,13 @@ import { formatTimestampedChartData } from 'utils/charts';
import useV2StrategySnapshotData, {
StrategyTokenField,
V2SnapshotMetric,
+ V2StrategySnapshot,
} from '../hooks/use-dashboardv2-daily-snapshots';
import {
ALL_STRATEGIES,
DashboardData,
isTRVDashboard,
- StrategyKey,
} from '../DashboardConfig';
-import { V2StrategySnapshot } from 'utils/subgraph';
type XAxisTickFormatter = (timestamp: number) => string;
@@ -182,16 +181,12 @@ const V2StrategyMetricsChart: React.FC<{
const filteredDaily =
dailyMetrics
- ?.filter((m) =>
- chartStrategyNames.includes(m.strategy.name as StrategyKey)
- )
+ ?.filter((m) => chartStrategyNames.includes(m.strategy.name))
.sort((a, b) => parseInt(a.timestamp) - parseInt(b.timestamp)) ?? [];
const filteredHourly =
hourlyMetrics
- ?.filter((m) =>
- chartStrategyNames.includes(m.strategy.name as StrategyKey)
- )
+ ?.filter((m) => chartStrategyNames.includes(m.strategy.name))
.sort((a, b) => parseInt(a.timestamp) - parseInt(b.timestamp)) ?? [];
// if we are rendering chart for only one strategy we can use data as is
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/DashboardConfig.tsx b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/DashboardConfig.tsx
index c3134bc0d..528521ab2 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/DashboardConfig.tsx
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/DashboardConfig.tsx
@@ -38,7 +38,7 @@ export const Dashboards: DashboardData[] = [
title: 'TRV',
path: 'treasuryreservesvault',
description:
- 'Treasury Reserves Vault (TRV) is the central clearinghouse for the Temple Treasury and critical coordinator for current Treasury Strategy allocations. When funding and management parameters are approved for a Strategy, the TRV will transfer funds and issue corresponding debt to the Strategy borrower. The current equity of the Strategy is discounted by the loan principal and accrued interest benchmarked to the prevailing rate of the current Base Strategy for the borrowed token.',
+ 'Treasury Reserves Vault (TRV) coordinates and manages the flow of capital for current Treasury allocations. When funding and management parameters are approved for a Strategy, the TRV will transfer funds e.g. DAI and issue corresponding debt to the Strategy borrower. The current equity of the Strategy is discounted by the loan principal and accrued interest benchmarked to the prevailing rate of the current Base Strategy for the borrowed token.',
contractLink: `${env.etherscan}/address/${env.contracts.treasuryReservesVault}`,
},
{
@@ -47,7 +47,7 @@ export const Dashboards: DashboardData[] = [
title: 'RAMOS',
path: 'ramos',
description:
- 'Ramos is the automated market operations (AMO) manager that supplies liquidity to the TEMPLE/DAI pool on the Balancer DEX. A bot manages the contract to support TEMPLE trading, reduce price volatility, and earn farming rewards.',
+ 'Ramos is the automated market operations (AMO) manager that supplies liquidity to the TEMPLE/DAI pool on the Balancer Exchange platform. A bot manages the contract to support TEMPLE trading, reduce price volatility, and earn farming rewards.',
contractLink: `${env.etherscan}/address/${env.contracts.strategies.ramosStrategy}`,
},
{
@@ -56,7 +56,7 @@ export const Dashboards: DashboardData[] = [
title: 'TLC',
path: 'tlc',
description:
- 'Temple Loving Care (also known as Temple Line of Credit) offers DAI lending for users who supply TEMPLE as collateral. The TLC will use the current Treasury Price Index (TPI) Oracle to determine the collateral value of TEMPLE. Users may borrow up to 85% loan-to-value (LTV) with the TEMPLE liquidation LTV set to 90%. There are no origination fees and users can withdraw their TEMPLE at any time by repaying the DAI loan. The TLC interest rate is set to a fixed rate that will be periodically updated to 2X the yield from the current Treasury Base Strategy e.g. sDAI. Click here to learn more about Temple Loving Care.',
+ 'Temple Loving Care (also known as Temple Line of Credit) offers DAI lending for users who supply TEMPLE token as collateral. The value of the collateral is not determined by the current $TEMPLE spot price on the Balancer DEX but by the current Treasury Price Index (TPI). Users may borrow up to 75% loan-to-value (LTV) with the liquidation LTV set to 80%. There are no origination fees and users can withdraw their collateral at any time by repaying the DAI loan. TLC interest rate is a variable APR that is dependent on Debt Ceiling Utilisation. Any accrued interest will increase LTV over time. Borrowers can expect the APR to be set no lower than the prevailing APR for the Treasury DAI Base Strategy. Click here to learn more about Temple Loving Care.',
contractLink: `${env.etherscan}/address/${env.contracts.strategies.tlcStrategy}`,
},
{
@@ -65,7 +65,7 @@ export const Dashboards: DashboardData[] = [
title: 'TEMPLE BASE',
path: 'templebase',
description:
- 'TEMPLE Base strategy is the funding source for TEMPLE tokens for automated market operations (AMO) in the Treasury framework. The TRV facilitates the withdrawal of newly minted TEMPLE tokens from and the issuance of TEMPLE debt to the TEMPLE Base strategy. These TEMPLE tokens will be borrowed by a Treasury Strategy such as Ramos to generate returns. Once these tokens are repaid to the TRV, they will be deposited to the TEMPLE Base strategy to be burned. Positive returns will be realized when TEMPLE flows to the TEMPLE Base strategy is net positive.',
+ 'Temple Base strategy is the source of automated market operations (AMO) TEMPLE tokens in the Treasury framework. The TRV facilitates the withdrawal of newly minted TEMPLE tokens from and the issuance of TEMPLE debt to the Temple Base strategy. These TEMPLE tokens will be borrowed by a Treasury Strategy such as Ramos to generate returns. Once these tokens are repaid to the TRV, they will be deposited to the Temple Base strategy to be burned. From the perspective of the TRV, positive returns will be realized when TEMPLE flows to the Temple Base strategy is net positive.',
contractLink: `${env.etherscan}/address/${env.contracts.strategies.templeStrategy}`,
},
{
@@ -74,7 +74,7 @@ export const Dashboards: DashboardData[] = [
title: 'DSR BASE',
path: 'dsrbase',
description:
- 'Idle reserve capital in the TRV that is not currently borrowed by a Strategy Borrower will be automatically directed to a Base Strategy to earn yield. The TRV Base Strategy is currently set to the Dai Savings Rate (DSR) or sDAI. The current rate of return for the Base Strategy also serves as the performance benchmark or "risk-free" interest rate for Treasury Strategies.',
+ 'Idle capital in the Treasury Reserves Vault (TRV) that is not currently deployed to a Strategy borrower will be automatically directed to a Base Strategy to earn yield. Currently, the Base Strategy is set to the Dai Savings Rate (DSR) which makes DAI the base currency of the TRV. The current rate of return for DSR Base also serves as the benchmark interest rate for the Treasury Strategy that borrows DAI from the TRV.',
contractLink: `${env.etherscan}/address/${env.contracts.strategies.dsrBaseStrategy}`,
},
{
@@ -83,7 +83,7 @@ export const Dashboards: DashboardData[] = [
title: 'TEMPLO MAYOR',
path: 'templomayor',
description:
- 'Templo Mayor is an Gnosis Safe Omnibus Strategy that is particularly useful when full automation is not feasible. An Omnibus Strategy utilises the same bookkeeping structure and approval process as the automated Temple v2 Strategies, but may entail several related holdings or sub-positions that are managed holistically. For instance, deposits into different but similar or co-dependent vaults on the same platform or different platforms may be consolidated into one Omnibus Gnosis Safe. Partner seed allocations of a target risk profile may also be consolidated into an Omnibus Strategy to derisk any particular project. An Omnibus Strategy may provide additional operational efficiency and allow Stakeholders to evaluate a series of related deployments as one composite position rather than as singletons.',
+ 'Templo Mayor is an Gnosis Safe Omnibus strategy. An Omnibus Strategy utilises the same bookkeeping structure and approval process, but may entail several related holdings or sub-positions that are managed as a whole. For instance, deposits into different but similar or co-dependent vaults on the same platform or different platforms may be consolidated into one Omnibus Gnosis Safe. Seed allocations of a target risk profile may also be consolidated into an Omnibus Strategy to reduce the noise. Therefore an Omnibus Strategy may provide additional operational efficiency and allow Stakeholders to evaluate a series of related deployments as one composite position rather than as singletons.',
contractLink: `${env.etherscan}/address/${env.contracts.strategies.temploMayorGnosisStrategy}`,
},
{
@@ -92,7 +92,7 @@ export const Dashboards: DashboardData[] = [
title: 'FOHMO',
path: 'fohmo',
description:
- 'FOHMO is a strategy that aims to maintain a maximally looped position in OHM',
+ 'FOHMO is a strategy that aims to maintain a maxed looped position in OHM',
contractLink: `${env.etherscan}/address/${env.contracts.strategies.fohmoGnosisStrategy}`,
},
];
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/Table/TxnHistoryTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/Table/TxnHistoryTable.tsx
index e2e58ebad..a63049924 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/Table/TxnHistoryTable.tsx
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/Table/TxnHistoryTable.tsx
@@ -16,12 +16,7 @@ import { queryMinTablet } from 'styles/breakpoints';
import env from 'constants/env';
import linkSvg from 'assets/icons/link.svg?react';
import { formatNumberWithCommas } from 'utils/formatter';
-import {
- DashboardData,
- Dashboards,
- isTRVDashboard,
- StrategyKey,
-} from '../DashboardConfig';
+import { DashboardData, Dashboards, isTRVDashboard } from '../DashboardConfig';
type Props = {
dashboardData: DashboardData;
@@ -276,8 +271,8 @@ const TxnHistoryTable = (props: Props) => {
const timeOnly = format(new Date(Number(tx.timestamp) * 1000), 'H:mm:ss');
return {
date: isBiggerThanTablet ? datetime : dateOnly,
- type: tx.name as TxType,
- strategy: tx.strategy.name as StrategyKey,
+ type: tx.name,
+ strategy: tx.strategy.name,
token: tx.token.symbol,
amount: amountFmt,
txHash: tx.hash,
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-daily-snapshots.ts b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-daily-snapshots.ts
index 4e96c0a2a..2629078fd 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-daily-snapshots.ts
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-daily-snapshots.ts
@@ -1,12 +1,9 @@
import { useQuery } from '@tanstack/react-query';
import env from 'constants/env';
import { getQueryKey } from 'utils/react-query-helpers';
-import {
- queryStrategyDailySnapshots,
- queryStrategyHourlySnapshots,
- subgraphQuery,
- V2StrategySnapshot,
-} from 'utils/subgraph';
+import { SubGraphResponse } from 'hooks/core/types';
+import { fetchGenericSubgraph } from 'utils/subgraph';
+import { StrategyKey } from '../DashboardConfig';
const V2SnapshotMetrics = [
'totalMarketValueUSD',
@@ -33,12 +30,38 @@ const STRATEGY_TOKEN_FIELDS = [
export type StrategyTokenField = (typeof STRATEGY_TOKEN_FIELDS)[number];
+const QUERIED_FIELDS = `
+ strategy{
+ name
+ }
+ timeframe
+ timestamp
+ ${V2SnapshotMetrics.join('\n')}
+ strategyTokens{
+ ${STRATEGY_TOKEN_FIELDS.join('\n')}
+ }
+`;
+
+export type V2StrategySnapshot = {
+ timestamp: string;
+ timeframe: string;
+ strategy: { name: StrategyKey };
+ strategyTokens: { [key in (typeof STRATEGY_TOKEN_FIELDS)[number]]: string }[];
+} & { [key in V2SnapshotMetric]: string };
+
export function isV2SnapshotMetric(
key?: string | null
): key is V2SnapshotMetric {
return V2SnapshotMetrics.some((m) => m === key);
}
+type FetchV2StrategyDailySnapshotResponse = SubGraphResponse<{
+ strategyDailySnapshots: V2StrategySnapshot[];
+}>;
+type FetchV2StrategyHourlySnapshotResponse = SubGraphResponse<{
+ strategyHourlySnapshots: V2StrategySnapshot[];
+}>;
+
const ONE_DAY_ONE_HOUR_MS = 25 * 60 * 60 * 1000;
const ONE_YEAR_MS = 365 * 24 * 60 * 60 * 1000;
@@ -50,17 +73,22 @@ async function fetchStrategyHourlySnapshots() {
).toString();
// if # of strategies * 24 > 1000 we would be missing data
// but we shouldnt be getting anywhere close to that
- const resp = await subgraphQuery(
- env.subgraph.templeV2Balances,
- queryStrategyHourlySnapshots(
- V2SnapshotMetrics,
- STRATEGY_TOKEN_FIELDS,
- itemsPerPage,
- since
- )
- );
-
- return resp.strategyHourlySnapshots;
+ const query = `
+ query {
+ strategyHourlySnapshots(first: ${itemsPerPage},
+ orderBy: timestamp,
+ orderDirection: asc,
+ where: {timestamp_gt: ${since}}
+ ) {
+ ${QUERIED_FIELDS}
+ }
+ }`;
+ const resp =
+ await fetchGenericSubgraph(
+ env.subgraph.templeV2Balances,
+ query
+ );
+ return resp?.data?.strategyHourlySnapshots ?? [];
}
async function fetchStrategyDailySnapshots() {
@@ -71,19 +99,26 @@ async function fetchStrategyDailySnapshots() {
const MAX_PAGE_SIZE = 1000; // current max page size
let skip = 0;
while (true) {
- const page = await subgraphQuery(
- env.subgraph.templeV2Balances,
- queryStrategyDailySnapshots(
- V2SnapshotMetrics,
- STRATEGY_TOKEN_FIELDS,
- MAX_PAGE_SIZE,
- since,
- skip
- )
- );
- const itemsOnPage = page.strategyDailySnapshots.length ?? 0;
- result.push(...page.strategyDailySnapshots);
- skip += itemsOnPage;
+ const query = `
+ query {
+ strategyDailySnapshots(first: ${MAX_PAGE_SIZE},
+ orderBy: timestamp,
+ orderDirection: asc,
+ where: {timestamp_gt: ${since}}
+ skip: ${skip}) {
+ ${QUERIED_FIELDS}
+ }
+ }`;
+ const page =
+ await fetchGenericSubgraph(
+ env.subgraph.templeV2Balances,
+ query
+ );
+ const itemsOnPage = page.data?.strategyDailySnapshots.length ?? 0;
+ if (page.data) {
+ result.push(...page.data.strategyDailySnapshots);
+ skip += itemsOnPage;
+ }
if (itemsOnPage < MAX_PAGE_SIZE) {
break;
}
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-metrics.ts b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-metrics.ts
index f91780bee..9e1aaf85b 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-metrics.ts
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-metrics.ts
@@ -1,5 +1,6 @@
import { useQuery } from '@tanstack/react-query';
import millify from 'millify';
+import { fetchGenericSubgraph } from 'utils/subgraph';
import env from 'constants/env';
import { getQueryKey } from 'utils/react-query-helpers';
import {
@@ -8,21 +9,6 @@ import {
TrvKey,
isTRVDashboard,
} from '../DashboardConfig';
-import {
- queryBenchmarkRate,
- queryRamosData,
- queryStrategyBalances,
- queryStrategyData,
- queryTempleCirculatingSupply,
- queryTrvBalances,
- queryTrvData,
- StrategyBalancesResp,
- StrategyDataResp,
- subgraphQuery,
- TrvBalancesResp,
- TrvDataResp,
-} from 'utils/subgraph';
-import { aprToApy } from 'utils/helpers';
export enum TokenSymbols {
DAI = 'DAI',
@@ -98,52 +84,80 @@ export default function useDashboardV2Metrics(dashboardData: DashboardData) {
try {
const allMetricsPromises = [
- subgraphQuery(env.subgraph.templeV2, queryStrategyData()),
-
+ fetchGenericSubgraph(
+ env.subgraph.templeV2,
+ `{
+ strategies {
+ name
+ isShutdown
+ id
+ strategyTokens {
+ symbol
+ rate
+ premiumRate
+ debtShare
+ debtCeiling
+ debtCeilingUtil
+ }
+ totalRepaymentUSD
+ principalUSD
+ accruedInterestUSD
+ }
+ }`
+ ),
// includes the external balances so has to come from the second subgraph
- subgraphQuery(env.subgraph.templeV2Balances, queryStrategyBalances()),
+ fetchGenericSubgraph(
+ env.subgraph.templeV2Balances,
+ `{
+ strategies {
+ name
+ isShutdown
+ id
+ benchmarkedEquityUSD
+ totalMarketValueUSD
+ }
+ }`
+ ),
];
const [responses, responseExternalBalances] = await Promise.all(
allMetricsPromises
);
- const subgraphData = (responses as StrategyDataResp).strategies.find(
+ const subgraphData = responses?.data?.strategies.find(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(_strategy: any) =>
_strategy.name === strategy && _strategy.isShutdown === false
);
- const externalBalancesData = (
- responseExternalBalances as StrategyBalancesResp
- ).strategies.find(
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- (_strategy: any) =>
- _strategy.name === strategy && _strategy.isShutdown === false
- );
+ const externalBalancesData =
+ responseExternalBalances?.data?.strategies.find(
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ (_strategy: any) =>
+ _strategy.name === strategy && _strategy.isShutdown === false
+ );
- const daiStrategyTokenData = subgraphData!.strategyTokens.find(
+ const daiStrategyTokenData = subgraphData?.strategyTokens.find(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(_strategyToken: any) => _strategyToken.symbol === TokenSymbols.DAI
);
metrics = {
- valueOfHoldings: parseFloat(externalBalancesData!.totalMarketValueUSD),
+ valueOfHoldings: parseFloat(externalBalancesData.totalMarketValueUSD),
benchmarkedEquity: parseFloat(
- externalBalancesData!.benchmarkedEquityUSD
- ),
- interestRate: aprToApy(
- parseFloat(daiStrategyTokenData!.rate) +
- parseFloat(daiStrategyTokenData!.premiumRate)
+ externalBalancesData.benchmarkedEquityUSD
),
- debtShare: parseFloat(daiStrategyTokenData!.debtShare),
- debtCeiling: parseFloat(daiStrategyTokenData!.debtCeiling),
+ interestRate:
+ parseFloat(daiStrategyTokenData.rate) +
+ parseFloat(daiStrategyTokenData.premiumRate),
+ debtShare: parseFloat(daiStrategyTokenData.debtShare),
+ debtCeiling: parseFloat(daiStrategyTokenData.debtCeiling),
debtCeilingUtilization: parseFloat(
- daiStrategyTokenData!.debtCeilingUtil
+ daiStrategyTokenData.debtCeilingUtil
),
- totalRepayment: parseFloat(subgraphData!.totalRepaymentUSD),
- principal: parseFloat(subgraphData!.principalUSD),
- accruedInterest: parseFloat(subgraphData!.accruedInterestUSD),
+ totalRepayment: parseFloat(subgraphData.totalRepaymentUSD),
+ principal: parseFloat(subgraphData.principalUSD),
+ accruedInterest: parseFloat(subgraphData.accruedInterestUSD),
};
} catch (error) {
console.info(error);
@@ -167,11 +181,26 @@ export default function useDashboardV2Metrics(dashboardData: DashboardData) {
try {
const allMetricsPromises = [
- subgraphQuery(env.subgraph.templeV2, queryTrvData()),
-
+ fetchGenericSubgraph(
+ env.subgraph.templeV2,
+ `{
+ treasuryReservesVaults {
+ treasuryPriceIndex
+ principalUSD
+ accruedInterestUSD
+ }
+ }`
+ ),
// includes the external balances so has to come from the second subgraph
- subgraphQuery(env.subgraph.templeV2Balances, queryTrvBalances()),
-
+ fetchGenericSubgraph(
+ env.subgraph.templeV2Balances,
+ `{
+ treasuryReservesVaults {
+ totalMarketValueUSD
+ benchmarkedEquityUSD
+ }
+ }`
+ ),
getBenchmarkRate(),
getTempleCirculatingSupply(),
getTempleSpotPrice(),
@@ -185,21 +214,20 @@ export default function useDashboardV2Metrics(dashboardData: DashboardData) {
templeSpotPrice,
] = await Promise.all(allMetricsPromises);
- const trvSubgraphData = (trvSubgraphResponse as TrvDataResp)
- .treasuryReservesVaults[0];
+ const trvSubgraphData =
+ trvSubgraphResponse?.data?.treasuryReservesVaults[0];
- const externalBalancesData = (
- responseExternalBalances as TrvBalancesResp
- ).treasuryReservesVaults[0];
+ const externalBalancesData =
+ responseExternalBalances?.data?.treasuryReservesVaults[0];
metrics = {
totalMarketValue: parseFloat(
externalBalancesData.totalMarketValueUSD
),
- spotPrice: parseFloat(templeSpotPrice as string),
+ spotPrice: parseFloat(templeSpotPrice),
treasuryPriceIndex: parseFloat(trvSubgraphData.treasuryPriceIndex),
- circulatingSupply: parseFloat(templeCirculatingSupply as string),
- benchmarkRate: aprToApy(parseFloat(benchmarkRate as string)),
+ circulatingSupply: parseFloat(templeCirculatingSupply),
+ benchmarkRate: parseFloat(benchmarkRate),
principal: parseFloat(trvSubgraphData.principalUSD),
accruedInterest: parseFloat(trvSubgraphData.accruedInterestUSD),
benchmarkedEquity: parseFloat(
@@ -214,12 +242,18 @@ export default function useDashboardV2Metrics(dashboardData: DashboardData) {
};
const getBenchmarkRate = async () => {
- const debtTokensResponse = await subgraphQuery(
+ const debtTokensResponse = await fetchGenericSubgraph(
env.subgraph.templeV2,
- queryBenchmarkRate()
+ `{
+ debtTokens {
+ name
+ symbol
+ baseRate
+ }
+ }`
);
- const debtTokensData = debtTokensResponse.debtTokens;
+ const debtTokensData = debtTokensResponse?.data?.debtTokens;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return debtTokensData.find(
@@ -228,20 +262,37 @@ export default function useDashboardV2Metrics(dashboardData: DashboardData) {
};
const getTempleCirculatingSupply = async (): Promise => {
- const response = await subgraphQuery(
+ const response = await fetchGenericSubgraph(
env.subgraph.protocolMetrics,
- queryTempleCirculatingSupply()
+ `{
+ metrics(first: 1, orderBy: timestamp, orderDirection: desc) {
+ templeCirculatingSupply
+ }
+ }`
);
- return response.metrics[0].templeCirculatingSupply;
+
+ const data = response?.data?.metrics?.[0] || {};
+
+ return data.templeCirculatingSupply;
};
const getTempleSpotPrice = async () => {
- const response = await subgraphQuery(env.subgraph.ramos, queryRamosData());
- return response.metrics[0].spotPrice;
+ const response = await fetchGenericSubgraph(
+ env.subgraph.ramos,
+ `{
+ metrics {
+ spotPrice
+ }
+ }`
+ );
+
+ const data = response?.data?.metrics?.[0] || {};
+
+ return data.spotPrice;
};
const formatPercent = (input: number) => {
- return (Math.round(input * 10_000) / 100).toFixed(2);
+ return Math.round(input * 100).toFixed(2);
};
/**
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-txHistory.ts b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-txHistory.ts
index dba2d90b4..b80d4427e 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-txHistory.ts
+++ b/apps/dapp/src/components/Pages/Core/DappPages/Dashboard/hooks/use-dashboardv2-txHistory.ts
@@ -1,15 +1,32 @@
+import { fetchGenericSubgraph } from 'utils/subgraph';
import env from 'constants/env';
+import { SubGraphResponse } from 'hooks/core/types';
import { TxHistoryFilterType } from '../Table';
import { TableHeaders, TxHistoryTableHeader } from '../Table/TxnHistoryTable';
+import { TxType } from '../Table/TxnDataTable';
import { getQueryKey } from 'utils/react-query-helpers';
import { useQuery } from '@tanstack/react-query';
-import { DashboardData, isTRVDashboard } from '../DashboardConfig';
-import {
- subgraphQuery,
- queryStrategyTransactions,
- StrategyTransactions,
- queryStrategyTransactionsMeta,
-} from 'utils/subgraph';
+import { DashboardData, StrategyKey, isTRVDashboard } from '../DashboardConfig';
+
+type Transactions = {
+ hash: string;
+ strategy: {
+ id: string;
+ name: StrategyKey;
+ };
+ token: {
+ id: string;
+ name: string;
+ symbol: string;
+ };
+ amount: string;
+ amountUsd: string;
+ id: string;
+ from: string;
+ to: string;
+ name: TxType;
+ timestamp: string;
+}[];
type AvailableRows = {
totalTransactionCount: number;
@@ -17,6 +34,22 @@ type AvailableRows = {
blockNumber: number;
};
+type Metrics = {
+ strategyTransactionCount: number;
+}[];
+
+type Meta = {
+ block: {
+ number: number;
+ };
+};
+
+type FetchTxnsResponse = SubGraphResponse<{
+ strategyTransactions: Transactions;
+ metrics: Metrics;
+ _meta: Meta;
+}>;
+
export type RowFilter = {
type?: string;
strategy?: string;
@@ -78,7 +111,7 @@ const useTxHistory = (props: TxHistoryProps) =>
const fetchTransactions = async (
props: TxHistoryProps
-): Promise => {
+): Promise => {
const {
dashboardData,
blockNumber,
@@ -96,6 +129,8 @@ const fetchTransactions = async (
const blockNumberQueryParam =
blockNumber > 0 ? `block: { number: ${blockNumber} }` : ``;
+ const paginationQuery = `skip: ${offset} first: ${limit}`;
+
const dateNowSecs = Math.round(Date.now() / 1000);
const typeRowFilterQuery = `${
rowFilter.type ? 'name_contains_nocase: "' + rowFilter.type + '"' : ''
@@ -131,10 +166,32 @@ const fetchTransactions = async (
: 'asc'
: 'desc';
- const res = await subgraphQuery(
+ const subgraphQuery = `{
+ strategyTransactions(orderBy: ${orderBy}, orderDirection: ${orderType} ${paginationQuery} ${whereQuery}) {
+ hash
+ strategy {
+ id
+ name
+ }
+ token {
+ id
+ name
+ symbol
+ }
+ amount
+ amountUSD
+ id
+ from
+ name
+ timestamp
+ }
+ }`;
+
+ const { data: res } = await fetchGenericSubgraph(
env.subgraph.templeV2,
- queryStrategyTransactions(orderBy, orderType, offset, limit, whereQuery)
+ subgraphQuery
);
+ if (!res) return [];
return res.strategyTransactions;
};
@@ -167,18 +224,31 @@ const fetchTxHistoryAvailableRows = async (
: ''
}`;
// get the max allowed 1000 records for a more accurate totalPages calculation
- const whereQuery = `first: 1000
+ const whereQuery = `( first: 1000
where: {
${strategyQuery}
timestamp_gt: ${dateNowSecs - txHistoryFilterTypeToSeconds(txFilter)}
${typeRowFilterQuery}
${strategyRowFilterQuery}
${tokenRowFilterQuery}
- }`;
-
- const res = await subgraphQuery(
+ }
+ )`;
+ const subgraphQuery = `{
+ metrics {
+ strategyTransactionCount
+ }
+ strategyTransactions${whereQuery} {
+ hash
+ }
+ _meta {
+ block {
+ number
+ }
+ }
+ }`;
+ const { data: res } = await fetchGenericSubgraph(
env.subgraph.templeV2,
- queryStrategyTransactionsMeta(whereQuery)
+ subgraphQuery
);
let result: AvailableRows = {
@@ -191,29 +261,29 @@ const fetchTxHistoryAvailableRows = async (
if (rowFilter.strategy) hasRowFilters = rowFilter.strategy.length > 0;
if (rowFilter.token) hasRowFilters = rowFilter.token.length > 0;
if (rowFilter.type) hasRowFilters = rowFilter.type.length > 0;
+ if (res) {
+ let totalRowCount = 0;
+ if (
+ props.txFilter === TxHistoryFilterType.all &&
+ isTRVDashboard(strategyKey) &&
+ !hasRowFilters
+ ) {
+ // if user chooses all transactions, sum the txCountTotal of every strategy, we don't use this
+ // calc for the last30days or lastweek filters because it could show an incorrect number of totalPages
+ totalRowCount = res.metrics[0].strategyTransactionCount;
+ } else {
+ // if user chooses last30days or lastweek filters, count the length of txs of each strategy
+ // in this case there maybe a chance of incorrect calc if there are more than 1000 records,
+ // which is unlikely in foreseeable future. This due to the max 1000 records subgraph limitation
+ totalRowCount = res.strategyTransactions.length;
+ }
- let totalRowCount = 0;
- if (
- props.txFilter === TxHistoryFilterType.all &&
- isTRVDashboard(strategyKey) &&
- !hasRowFilters
- ) {
- // if user chooses all transactions, sum the txCountTotal of every strategy, we don't use this
- // calc for the last30days or lastweek filters because it could show an incorrect number of totalPages
- totalRowCount = res.metrics[0].strategyTransactionCount;
- } else {
- // if user chooses last30days or lastweek filters, count the length of txs of each strategy
- // in this case there maybe a chance of incorrect calc if there are more than 1000 records,
- // which is unlikely in foreseeable future. This due to the max 1000 records subgraph limitation
- totalRowCount = res.strategyTransactions.length;
+ result = {
+ totalRowCount,
+ blockNumber: res._meta.block.number,
+ totalTransactionCount: totalRowCount,
+ };
}
-
- result = {
- totalRowCount,
- blockNumber: res._meta.block.number,
- totalTransactionCount: totalRowCount,
- };
-
return result;
};
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Chart/Chart.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Chart/Chart.tsx
new file mode 100644
index 000000000..121fe7b3c
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Chart/Chart.tsx
@@ -0,0 +1,188 @@
+import { useEffect, useState } from 'react';
+import styled, { useTheme } from 'styled-components';
+import { format, subDays } from 'date-fns';
+import LineChart from './LineChart';
+import Loader from 'components/Loader/Loader';
+import { formatNumberAbbreviated } from 'utils/formatter';
+import expand from 'assets/icons/expand_more.svg?react';
+import * as breakpoints from 'styles/breakpoints';
+
+type XAxisTickFormatter = (timestamp: number) => string;
+
+const tickFormatter: XAxisTickFormatter = (timestamp) =>
+ format(new Date(timestamp), 'MMM dd');
+
+type Metric = { timestamp: number; price: number };
+
+enum Options {
+ ValueOfHoldings = 'Value of Holdings',
+ Option2 = 'Option 2',
+ Option3 = 'Option3',
+}
+
+const pricesLast7Days = [
+ { timestamp: subDays(new Date(), 6).getTime(), price: 1.13 },
+ { timestamp: subDays(new Date(), 5).getTime(), price: 1.14 },
+ { timestamp: subDays(new Date(), 4).getTime(), price: 1.13 },
+ { timestamp: subDays(new Date(), 3).getTime(), price: 1.14 },
+ { timestamp: subDays(new Date(), 2).getTime(), price: 1.16 },
+ { timestamp: subDays(new Date(), 1).getTime(), price: 1.15 },
+ { timestamp: new Date().getTime(), price: 1.17 },
+];
+
+export const Chart = () => {
+ const [metrics, setMetrics] = useState([]);
+ const theme = useTheme();
+
+ useEffect(() => {
+ setMetrics(pricesLast7Days);
+ }, []);
+
+ const [isOpen, setIsOpen] = useState(false);
+ const [selectedOption, setSelectedOption] = useState(Options.ValueOfHoldings);
+
+ const toggleDropDown = () => {
+ setIsOpen(!isOpen);
+ };
+
+ const handleSelectedOption = (option: Options) => {
+ setSelectedOption(option);
+ setIsOpen(!isOpen);
+ };
+
+ const [filter, setFilter] = useState('1W');
+
+ const filterOptions = ['1D', '1W', '1M', '1Y'];
+
+ if (!metrics.length) return ;
+
+ return (
+
+
+
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+ `$${formatNumberAbbreviated(val).number.toFixed(2)}\u00A0M`
+ }
+ tooltipLabelFormatter={tickFormatter}
+ yDomain={[1.12, 1.18]}
+ tooltipValuesFormatter={(value) => [`$ ${value.toFixed(2)} M`, 'Value']}
+ />
+
+ );
+};
+
+const PageContainer = styled.div`
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+`;
+
+const HeaderContainer = styled.div`
+ display: flex;
+ justify-content: space-between;
+ flex-direction: column;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const Option = styled.div`
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ gap: 10px;
+ padding: 5px 10px 5px 10px;
+ justify-content: space-between;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 5px;
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+
+ ${breakpoints.phoneAndAbove(`
+ width: 195px;
+ `)}
+`;
+
+const ExpandIcon = styled(expand)`
+ min-width: 24px;
+ min-height: 24px;
+`;
+
+const DropDownMenu = styled.ul`
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ position: absolute;
+ background: ${({ theme }) => theme.palette.grayOpaque};
+ box-shadow: ${({ theme }) => theme.palette.gradients.grey};
+`;
+
+const DropDownItem = styled.li`
+ padding: 8px 16px;
+ cursor: pointer;
+ color: ${({ theme }) => theme.palette.brand};
+ &:hover {
+ background-color: ${({ theme }) => theme.palette.brandLight};
+ }
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-self: flex-end;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ text-decoration: ${({ selected }) => (selected ? 'underline' : 'none')};
+ font-size: 16px;
+ line-height: 19px;
+ border: none;
+ cursor: pointer;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Chart/LineChart.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Chart/LineChart.tsx
new file mode 100644
index 000000000..247ca5cc2
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Chart/LineChart.tsx
@@ -0,0 +1,208 @@
+import type { DataKey, AxisDomain } from 'recharts/types/util/types';
+import React, { useState } from 'react';
+import { useTheme } from 'styled-components';
+import {
+ CartesianGrid,
+ ResponsiveContainer,
+ Line,
+ XAxis,
+ YAxis,
+ Tooltip,
+ Legend,
+ ComposedChart,
+ Area,
+} from 'recharts';
+import { formatNumberAbbreviated } from 'utils/formatter';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+type LineChartProps = {
+ chartData: T[];
+ xDataKey: DataKey;
+ lines: { series: DataKey; color: string; hide?: boolean }[];
+ stackedItems?: {
+ series: string;
+ color: string;
+ stackId: string;
+ hide?: boolean;
+ }[];
+ xTickFormatter: (xValue: any, index: number) => string;
+ yTickFormatter?: (yValue: any, index: number) => string;
+ tooltipLabelFormatter: (value: any) => string;
+ tooltipValuesFormatter?: (value: number, name: string) => string[];
+ legendFormatter?: (value: string) => string;
+ yDomain?: AxisDomain;
+ onLegendClick?: (key: string) => void;
+};
+
+export default function LineChart(
+ props: React.PropsWithChildren>
+) {
+ const {
+ chartData,
+ xDataKey,
+ lines,
+ stackedItems,
+ xTickFormatter,
+ yTickFormatter,
+ tooltipLabelFormatter,
+ tooltipValuesFormatter,
+ legendFormatter,
+ yDomain,
+ } = props;
+ const theme = useTheme();
+
+ const [hiddenLines, setHiddenLines] = useState({
+ ...Object.fromEntries(
+ lines.map((s) => [s.series.toString(), s.hide || false])
+ ),
+ ...Object.fromEntries(
+ stackedItems?.map((s) => [s.series.toString(), s.hide || false]) ?? []
+ ),
+ });
+
+ const toggleLineVisibility = (key: string) => {
+ //there must be always at least one visible line
+ // otherwise the chart breaks
+ const nextState = {
+ ...hiddenLines,
+ [key]: !hiddenLines[key],
+ };
+
+ const totalLines = Object.values(hiddenLines).length;
+ const wouldBeHiddenLinesCount = Object.values(nextState).reduce(
+ (hiddenCount, isHidden) => (isHidden ? hiddenCount + 1 : hiddenCount),
+ 0
+ );
+
+ if (totalLines - wouldBeHiddenLinesCount === 0) {
+ return;
+ }
+ setHiddenLines(nextState);
+ };
+
+ const isDesktop = useMediaQuery({
+ query: queryPhone,
+ });
+ return (
+
+
+
+ {stackedItems?.map((item) => (
+
+ ))}
+ {lines.map((line) => (
+
+ ))}
+
+ yTickFormatter(val, i)
+ : (value) => formatNumberAbbreviated(value).string
+ }
+ tick={{
+ fill: theme.palette.brandLight,
+ style: {
+ fontSize: '12px',
+ fontWeight: '700',
+ lineHeight: '18px',
+ letterSpacing: '0.05em',
+ },
+ }}
+ offset={10}
+ domain={yDomain}
+ ticks={[1.12, 1.14, 1.16, 1.18]}
+ tickMargin={20}
+ />
+ {
+ //@ts-ignore
+ return tooltipValuesFormatter(value, name);
+ }
+ : undefined
+ }
+ />
+ {legendFormatter ? (
+
+
+ );
+}
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Table/DataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Table/DataTable.tsx
new file mode 100644
index 000000000..a296943ec
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Table/DataTable.tsx
@@ -0,0 +1,218 @@
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import { PaginationControl } from 'components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl';
+import * as breakpoints from 'styles/breakpoints';
+
+export type Transaction = {
+ key: number;
+ date: string;
+ debit: number | '-';
+ credit: number | '-';
+};
+
+type TableHeaderType = { name: string };
+
+type TableProps = {
+ tableHeaders: TableHeaderType[];
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+const ROWS_PER_PAGE = 15;
+
+export const DataTable: React.FC = ({
+ tableHeaders,
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const [filter, setFilter] = useState('Last 30 Days');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+ const [currentPage, setCurrentPage] = useState(1);
+
+ const filterOptions = ['Last Week', 'Last 30 Days', 'All'];
+
+ useEffect(() => {
+ const parseDate = (dateString: string): Date => {
+ const [day, month, year] = dateString.split('/').map(Number);
+ return new Date(year, month - 1, day);
+ };
+
+ const newFilteredTransactions = transactions.filter((transaction) => {
+ const auctionEndDate = parseDate(transaction.date); // Parse the date using DD/MM/YYYY format
+
+ const today = new Date();
+ const thirtyDaysAgo = new Date();
+ thirtyDaysAgo.setDate(today.getDate() - 30);
+
+ if (filter === 'Last Week') {
+ const startOfWeek = new Date();
+ startOfWeek.setDate(today.getDate() - today.getDay());
+ return auctionEndDate >= startOfWeek && auctionEndDate <= today;
+ }
+ if (filter === 'Last 30 Days') {
+ return auctionEndDate >= thirtyDaysAgo && auctionEndDate <= today;
+ }
+ return true;
+ });
+
+ setFilteredTransactions(newFilteredTransactions);
+ setCurrentPage(1);
+ }, [filter, transactions]);
+
+ const indexOfLastTransaction = currentPage * ROWS_PER_PAGE;
+ const indexOfFirstTransaction = indexOfLastTransaction - ROWS_PER_PAGE;
+ const currentTransactions = filteredTransactions.slice(
+ indexOfFirstTransaction,
+ indexOfLastTransaction
+ );
+
+ const totalPages = Math.ceil(filteredTransactions.length / ROWS_PER_PAGE);
+
+ return (
+
+
+ Transaction History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+ {tableHeaders.map((h) => (
+ {h.name}
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : currentTransactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ currentTransactions.map((transaction) => (
+
+ {transaction.date}
+
+ {transaction.debit !== '-'
+ ? `$${Number(transaction.debit).toFixed(2)}`
+ : ''}
+
+
+ {transaction.credit !== '-'
+ ? `$${Number(transaction.credit).toFixed(2)}`
+ : ''}
+
+
+ ))
+ )}
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 32px;
+ `)}
+`;
+
+const Header = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: center;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ font-size: 16px;
+ line-height: 19px;
+ border: none;
+ cursor: pointer;
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px;
+ width: 100%;
+ border-collapse: collapse;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ width: 33.33%;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const DataRow = styled.tr`
+ &:hover {
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ }
+`;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ width: 33.33%;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Table/Table.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Table/Table.tsx
new file mode 100644
index 000000000..25249072c
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/Table/Table.tsx
@@ -0,0 +1,167 @@
+import styled from 'styled-components';
+import { DataTable } from './DataTable';
+import type { Transaction } from './DataTable';
+
+enum TableHeaders {
+ Date = 'Date',
+ Debit = 'Debit',
+ Credit = 'Credit',
+}
+
+const data: Transaction[] = [
+ {
+ key: 1,
+ date: '02/11/2024',
+ debit: '-',
+ credit: 20832.81,
+ },
+ {
+ key: 2,
+ date: '02/11/2024',
+ debit: '-',
+ credit: 5891.0,
+ },
+ {
+ key: 3,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 4,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 5,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 6,
+ date: '12/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 7,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 8,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 9,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 10,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 11,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 12,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 13,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 14,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 15,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 16,
+ date: '02/11/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 17,
+ date: '12/12/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 18,
+ date: '12/12/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 19,
+ date: '12/12/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 20,
+ date: '12/12/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 21,
+ date: '12/12/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+ {
+ key: 22,
+ date: '12/12/2024',
+ debit: 1200.9,
+ credit: '-',
+ },
+];
+
+const tableHeaders = [
+ { name: TableHeaders.Date },
+ { name: TableHeaders.Debit },
+ { name: TableHeaders.Credit },
+];
+
+export const TransactionsHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/index.tsx
new file mode 100644
index 000000000..d370de42e
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Analytics/index.tsx
@@ -0,0 +1,358 @@
+import styled from 'styled-components';
+import { useState } from 'react';
+import linkSvg from 'assets/icons/link.svg?react';
+import { TransactionsHistory } from './Table/Table';
+import { Chart } from './Chart/Chart';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+type ItemProps = {
+ isActive: boolean;
+};
+
+const Selectors = ['USD', 'DAI', 'TEMPLE', 'TGLD'];
+
+export const Analytics = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ const [activeTab, setActiveTab] = useState('USD');
+
+ return (
+
+
+ Analytics
+
+
+
+
+ Base currency
+
+ {Selectors.map((item) => (
+ - setActiveTab(item)}
+ >
+ {item}
+
+ ))}
+
+
+
+
+
+ $1.12 M
+ Value of Holdings
+
+
+ $0.69 M
+ Nominal Equity
+
+
+ $0.19 M
+ Benchmarked Equity
+
+
+ 5.58% p.a.
+ Interest Rate
+
+
+
+ {isPhoneOrAbove ? (
+ <>
+
+
+ 36%
+ Dept Share
+
+
+ $4.51 M
+ Debt Ceiling
+
+
+ 25.12%
+ Debt Ceiling Utilization
+
+
+ 2.41 DAI
+ Total Repayment
+
+
+ $1.20 B
+ Principal
+
+
+ $980.83 K
+ Accrued dUSD Interest
+
+
+
+
+ $0.44 B
+ Nominal Equity
+
+
+ $1.20 B
+ Benchmarked Equity
+
+
+ 1.35%
+ Nominal Performance
+
+
+ 0.38%
+ Benchmark Performance
+
+
+ 110%
+ Positive Threshold
+
+
+ 90%
+ Negative Threshold
+
+
+ >
+ ) : (
+ <>
+
+
+ 36%
+ Dept Share
+
+
+ $4.51 M
+ Debt Ceiling
+
+
+
+
+ 25.12%
+ Debt Ceiling Utilization
+
+
+ 2.41 DAI
+ Total Repayment
+
+
+
+
+ $1.20 B
+ Principal
+
+
+ $980.83 K
+ Accrued dUSD Interest
+
+
+
+
+ $0.44 B
+ Nominal Equity
+
+
+ $1.20 B
+ Benchmarked Equity
+
+
+
+
+ 1.35%
+ Nominal Performance
+
+
+ 0.38%
+ Benchmark Performance
+
+
+
+
+ 110%
+ Positive Threshold
+
+
+ 90%
+ Negative Threshold
+
+
+ >
+ )}
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ margin-top: -20px;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 40px;
+ `)}
+`;
+
+const Title = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 15px;
+`;
+
+const TitleText = styled.h2`
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+ font-size: 28px;
+ line-height: 52px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 36px;
+ line-height: 67px;
+ `)}
+`;
+
+const LinkIcon = styled(linkSvg)`
+ fill: ${({ theme }) => theme.palette.brand};
+ cursor: pointer;
+`;
+
+const BodyContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 60px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 40px;
+ `)}
+`;
+
+const Selector = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 25px;
+ align-items: center;
+`;
+
+const SelectorTitle = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const Items = styled.div`
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ height: 37px;
+ gap: 16px;
+ border: 1.5px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 30px;
+ backdrop-filter: blur(42px)
+ box-shadow: -5px -5px 250px 0px #FFFFFF05 inset;
+`;
+
+const Item = styled.button`
+ cursor: pointer;
+ background: ${(props) =>
+ props.isActive
+ ? ({ theme }) => theme.palette.gradients.greyVertical
+ : 'none'};
+ border: ${({ isActive, theme }) =>
+ isActive ? `1.5px solid ${theme.palette.brand}` : 'none'};
+ border-radius: 40px;
+ box-shadow: ${(props) =>
+ props.isActive ? '0px 0px 20px 0px #DE5C0666' : 'none'};
+ padding: 8px 20px 8px 20px;
+`;
+
+const ItemText = styled.p`
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const InfoRow1 = styled.div`
+ display: flex;
+ gap: 22.5px;
+ flex-direction: column;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const InfoRow2 = styled.div`
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+ padding: 0px 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 0px;
+ padding: 0px 0px;
+ `)}
+`;
+
+const InfoCell1 = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ flex-grow: 1;
+ flex-basis: 0;
+ align-items: center;
+ padding: 18px 30px 18px 30px;
+ gap: 5px;
+ border-radius: 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ background: linear-gradient(180deg, #0b0a0a 0%, #1d1a1a 100%);
+ min-height: 136px;
+
+ ${breakpoints.phoneAndAbove(`
+ min-height: 109px;
+ `)}
+`;
+
+const InfoCell2 = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ padding: 7px 8px 7px 8px;
+ gap: 6px;
+ min-width: 200px;
+ height: 52px;
+`;
+
+const Value1 = styled.div`
+ font-size: 24px;
+ line-height: 30px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const Text1 = styled.p`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const Value2 = styled.p`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const Text2 = styled.p`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/BidTGLD.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/BidTGLD.tsx
new file mode 100644
index 000000000..47b4c60bc
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/BidTGLD.tsx
@@ -0,0 +1,236 @@
+import styled from 'styled-components';
+import { TradeButton } from './Details/Details';
+import templeGold from 'assets/icons/temple-gold.svg?react';
+import { Input } from '.././components/Input';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+export const BidTGLD = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ return (
+
+
+ BID TGLD
+
+
+
+
+
+ 70.53 TGLD
+ AVAILABLE
+
+
+
+
+ Your Bid Amount
+
+
+
+
+ If the current bid price holds, you will {!isPhoneOrAbove &&
}
+ receive X {isPhoneOrAbove &&
}
+ TOKEN at 5.32 TGLD per TOKEN
+
+
+
+ i
+
+
+
+ Current TGLD price may rise before the end of the auction.
+
+
+ Once submitted, the bid cannot be withdrawn or cancelled.
+
+
+
+ console.log('clicked')}
+ >
+ SUBMIT BID
+
+
+
+ );
+};
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ flex-grow: 1;
+ gap: 32px;
+ max-width: 393px;
+ padding: 0px 16px 0px 16px;
+
+ ${breakpoints.phoneAndAbove(`
+ max-width: 100%;
+ padding: 0px 0px 0px 0px;
+ `)}
+`;
+
+const TitleContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ height: 77px;
+ width: 100%;
+ justify-content: center;
+ align-items: center;
+ background: ${({ theme }) => theme.palette.gradients.grey};
+
+ ${breakpoints.phoneAndAbove(`
+ width: 624px;
+ `)}
+`;
+
+const Title = styled.h3`
+ diplay: flex;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 28px;
+ line-height: 52px;
+ text-align: center;
+ margin: 0px;
+`;
+
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ padding: 8px 0px 8px 0px;
+ gap: 24px;
+ width: 360px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const AvailableAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const AvailableAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const AvailableAmount = styled.h3`
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.gold};
+ margin: 0px;
+`;
+
+const AvailableText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const BidContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ border-top: 2px solid ${({ theme }) => theme.palette.brand};
+ border-bottom: 2px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 32px;
+`;
+
+const BidContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const TitleBid = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const TempleGoldIcon = styled(templeGold)`
+ width: 42px;
+ height: 42px;
+`;
+
+const ReceiveText = styled.div`
+ padding: 0px 20px 0px 20px;
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const InfoCircle = styled.div`
+ display: flex;
+ margin: 0.25rem;
+ padding: 0.5rem;
+ align-items: center;
+ justify-content: center;
+ width: 1.25rem;
+ height: 1.25rem;
+ font-size: 1rem;
+ font-weight: 600;
+ border-radius: 50%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const MessageText = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const Text = styled.p`
+ margin: 0px;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
+
+const WarningMessage = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ border: 2px solid transparent;
+ border-image-source: linear-gradient(
+ 180deg,
+ rgba(149, 97, 63, 0.1) 0%,
+ rgba(255, 255, 255, 0) 100%
+ );
+ border-image-slice: 1;
+ border-radius: 6px;
+ padding: 10px 0px 10px 10px;
+ gap: 10px;
+ background: #24272c;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Chart/Chart.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Chart/Chart.tsx
new file mode 100644
index 000000000..e5bb87939
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Chart/Chart.tsx
@@ -0,0 +1,60 @@
+import { useEffect, useState } from 'react';
+import styled, { useTheme } from 'styled-components';
+import { subHours } from 'date-fns';
+import LineChart from './LineChart';
+import Loader from 'components/Loader/Loader';
+import { formatNumberAbbreviated } from 'utils/formatter';
+
+const tickFormatter = (timestamp: number) => {
+ const hoursAgo = Math.floor(
+ (new Date().getTime() - timestamp) / (1000 * 60 * 60)
+ );
+ return `${hoursAgo}h`;
+};
+
+type Metric = { timestamp: number; price: number };
+
+const pricesLast72H = [
+ { timestamp: new Date().getTime(), price: 1.8 },
+ { timestamp: subHours(new Date(), 12).getTime(), price: 2.1 },
+ { timestamp: subHours(new Date(), 24).getTime(), price: 2.4 },
+ { timestamp: subHours(new Date(), 36).getTime(), price: 2.6 },
+ { timestamp: subHours(new Date(), 48).getTime(), price: 2.2 },
+ { timestamp: subHours(new Date(), 60).getTime(), price: 3.7 },
+ { timestamp: subHours(new Date(), 72).getTime(), price: 3.2 },
+];
+
+export const Chart = () => {
+ const [metrics, setMetrics] = useState([]);
+ const theme = useTheme();
+
+ useEffect(() => {
+ setMetrics(pricesLast72H);
+ }, []);
+
+ if (!metrics.length) return ;
+
+ return (
+
+
+ `${formatNumberAbbreviated(val).number.toFixed(2)}\u00A0TGLD`
+ }
+ tooltipLabelFormatter={tickFormatter}
+ yDomain={[1, 4]}
+ tooltipValuesFormatter={(value) => [
+ `${value.toFixed(2)} TGLD`,
+ 'Price',
+ ]}
+ />
+
+ );
+};
+
+const PageContainer = styled.div`
+ height: 100%;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Chart/LineChart.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Chart/LineChart.tsx
new file mode 100644
index 000000000..2d529857d
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Chart/LineChart.tsx
@@ -0,0 +1,209 @@
+import type { DataKey, AxisDomain } from 'recharts/types/util/types';
+
+import React, { useState } from 'react';
+import { useTheme } from 'styled-components';
+import {
+ CartesianGrid,
+ ResponsiveContainer,
+ Line,
+ XAxis,
+ YAxis,
+ Tooltip,
+ Legend,
+ ComposedChart,
+ Area,
+} from 'recharts';
+import { formatNumberAbbreviated } from 'utils/formatter';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+type LineChartProps = {
+ chartData: T[];
+ xDataKey: DataKey;
+ lines: { series: DataKey; color: string; hide?: boolean }[];
+ stackedItems?: {
+ series: string;
+ color: string;
+ stackId: string;
+ hide?: boolean;
+ }[];
+ xTickFormatter: (xValue: any, index: number) => string;
+ yTickFormatter?: (yValue: any, index: number) => string;
+ tooltipLabelFormatter: (value: any) => string;
+ tooltipValuesFormatter?: (value: number, name: string) => string[];
+ legendFormatter?: (value: string) => string;
+ yDomain?: AxisDomain;
+ onLegendClick?: (key: string) => void;
+};
+
+export default function LineChart(
+ props: React.PropsWithChildren>
+) {
+ const {
+ chartData,
+ xDataKey,
+ lines,
+ stackedItems,
+ xTickFormatter,
+ yTickFormatter,
+ tooltipLabelFormatter,
+ tooltipValuesFormatter,
+ legendFormatter,
+ yDomain,
+ } = props;
+ const theme = useTheme();
+
+ const [hiddenLines, setHiddenLines] = useState({
+ ...Object.fromEntries(
+ lines.map((s) => [s.series.toString(), s.hide || false])
+ ),
+ ...Object.fromEntries(
+ stackedItems?.map((s) => [s.series.toString(), s.hide || false]) ?? []
+ ),
+ });
+
+ const toggleLineVisibility = (key: string) => {
+ //there must be always at least one visible line
+ // otherwise the chart breaks
+ const nextState = {
+ ...hiddenLines,
+ [key]: !hiddenLines[key],
+ };
+
+ const totalLines = Object.values(hiddenLines).length;
+ const wouldBeHiddenLinesCount = Object.values(nextState).reduce(
+ (hiddenCount, isHidden) => (isHidden ? hiddenCount + 1 : hiddenCount),
+ 0
+ );
+
+ if (totalLines - wouldBeHiddenLinesCount === 0) {
+ return;
+ }
+ setHiddenLines(nextState);
+ };
+
+ const isDesktop = useMediaQuery({
+ query: queryPhone,
+ });
+ return (
+
+
+
+ {stackedItems?.map((item) => (
+
+ ))}
+ {lines.map((line) => (
+
+ ))}
+
+ yTickFormatter(val, i)
+ : (value) => formatNumberAbbreviated(value).string
+ }
+ tick={{
+ fill: theme.palette.brandLight,
+ style: {
+ fontSize: '12px',
+ fontWeight: '700',
+ lineHeight: '18px',
+ letterSpacing: '0.05em',
+ },
+ }}
+ offset={10}
+ domain={yDomain}
+ ticks={[1.0, 2.0, 3.0, 4.0]}
+ tickMargin={20}
+ />
+ {
+ //@ts-ignore
+ return tooltipValuesFormatter(value, name);
+ }
+ : undefined
+ }
+ />
+ {legendFormatter ? (
+
+
+ );
+}
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/DataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/DataTable.tsx
new file mode 100644
index 000000000..53695872b
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/DataTable.tsx
@@ -0,0 +1,256 @@
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import { Transaction } from './Table';
+import { PaginationControl } from 'components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl';
+import * as breakpoints from 'styles/breakpoints';
+
+enum TableHeaders {
+ Epoch = 'EPOCH',
+ Status = 'Status',
+ AuctionStartDate = 'Auction Start Date',
+ AuctionEndDate = 'Auction End Date',
+ AmountTGLDAuctioned = 'Amount TGLD Auctioned',
+ PriceRatio = 'Price Ratio',
+}
+
+type TableProps = {
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+const ROWS_PER_PAGE = 4;
+
+export const DataTable: React.FC = ({
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const tableHeaders = [
+ { name: TableHeaders.Epoch },
+ { name: TableHeaders.Status },
+ { name: TableHeaders.AuctionStartDate },
+ { name: TableHeaders.AuctionEndDate },
+ { name: TableHeaders.AmountTGLDAuctioned },
+ { name: TableHeaders.PriceRatio },
+ ];
+
+ const [filter, setFilter] = useState('Last 30 Days');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+ const [currentPage, setCurrentPage] = useState(1);
+
+ const filterOptions = ['Last Week', 'Last 30 Days', 'All'];
+
+ useEffect(() => {
+ const newFilteredTransactions = transactions.filter((transaction) => {
+ const auctionEndDate = new Date(transaction.auctionStartDate);
+ const today = new Date();
+ const thirtyDaysAgo = new Date();
+ thirtyDaysAgo.setDate(today.getDate() - 30);
+
+ if (filter === 'Last Week') {
+ const startOfWeek = new Date();
+ startOfWeek.setDate(today.getDate() - today.getDay());
+ return auctionEndDate >= startOfWeek && auctionEndDate <= today;
+ }
+ if (filter === 'Last 30 Days') {
+ return auctionEndDate >= thirtyDaysAgo && auctionEndDate <= today;
+ }
+ return true;
+ });
+
+ setFilteredTransactions(newFilteredTransactions);
+ setCurrentPage(1);
+ }, [filter, transactions]);
+
+ const indexOfLastTransaction = currentPage * ROWS_PER_PAGE;
+ const indexOfFirstTransaction = indexOfLastTransaction - ROWS_PER_PAGE;
+ const currentTransactions = filteredTransactions.slice(
+ indexOfFirstTransaction,
+ indexOfLastTransaction
+ );
+
+ const totalPages = Math.ceil(filteredTransactions.length / ROWS_PER_PAGE);
+
+ return (
+
+
+ Auctions History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+
+ {tableHeaders.map((h) => (
+ {h.name}
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : currentTransactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ currentTransactions.map((transaction) => (
+
+ {transaction.epoch}
+ {transaction.status}
+
+ {transaction.status !== 'Not yet started'
+ ? transaction.auctionStartDate
+ : '-'}
+
+
+ {transaction.status === 'Finished'
+ ? transaction.auctionEndDate
+ : '-'}
+
+ {transaction.amountTGLD}
+
+ {transaction.status === 'Finished'
+ ? transaction.priceRatio
+ : '-'}
+
+
+ ))
+ )}
+
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 10px;
+ `)}
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ flex-direction: column;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ font-size: 16px;
+ line-height: 19px;
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableWrapper = styled.div`
+ overflow-x: scroll;
+ padding-bottom: 20px;
+ scrollbar-width: thin;
+ scrollbar-color: #58321a #95613f;
+
+ &::-webkit-scrollbar {
+ height: 8px;
+ background: transparent;
+ border-radius: 8px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: linear-gradient(to right, #58321a 20%, #95613f 84.5%);
+ margin: 2px 82px 2px 2px;
+ }
+
+ &::-webkit-scrollbar-track {
+ border: 1px solid #351f11;
+ border-radius: 8px;
+ }
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px;
+ min-width: 980px;
+ border-collapse: collapse;
+ width: 100%;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ color: ${({ theme }) => theme.palette.brand};
+ position: sticky;
+ top: 0;
+ z-index: 1;
+`;
+
+const DataRow = styled.tr`
+ padding-left: 16px;
+`;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+
+ &:first-child {
+ padding-left: 16px;
+ }
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/Details.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/Details.tsx
new file mode 100644
index 000000000..5a694af09
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/Details.tsx
@@ -0,0 +1,393 @@
+import linkSvg from 'assets/icons/link.svg?react';
+import active from 'assets/icons/active.svg?react';
+import scheduled from 'assets/icons/scheduled.svg?react';
+import styled from 'styled-components';
+import { useState } from 'react';
+import { Button } from 'components/Button/Button';
+import { Chart } from '../Chart/Chart';
+import { BidTGLD } from '../BidTGLD';
+import { Popover } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Popover';
+import { AuctionsHistory } from './Table';
+import { BidTopNav } from '../TopNav';
+import * as breakpoints from 'styles/breakpoints';
+
+export const Details = () => {
+ const [isLive, setIsLive] = useState(true);
+ const [modal, setModal] = useState<'closed' | 'bidTgld'>('closed');
+
+ return (
+ <>
+
+
+
+
+
+
+ Spice Auctions Details
+
+
+
+
+
+
+
+ Current Auction
+ 0xC4973de5e...5EcF
+
+
+ EPOCH 2
+
+
+
+ {
+ setIsLive(!isLive);
+ }}
+ >
+ {isLive ? (
+ <>
+
+
+ ACTIVE
+
+
+ Ends in 00:15:03:04 at 07.07.24 23:59 CST
+
+ >
+ ) : (
+ <>
+
+
+ SCHEDULE
+
+ 05.10.24 at 00:00 CST
+ >
+ )}
+
+
+
+
+
+ Amount to be auctioned
+ 2500 TOKENS
+
+
+ Price Ratio
+ 1 Token = 5.32 TGLD
+ View history
+
+
+ Amount TGLD submitted until now
+ 2500 TGLD
+
+
+ {isLive ? (
+
+ Token Price History
+
+
+ ) : null}
+
+ setModal('bidTgld')}
+ style={{ whiteSpace: 'nowrap' }}
+ >
+ BID TGLD
+
+
+
+
+
+
+
+
+
+ setModal('closed')}
+ closeOnClickOutside
+ showCloseButton
+ >
+
+
+ >
+ );
+};
+
+const LinkIcon = styled(linkSvg)`
+ fill: ${({ theme }) => theme.palette.brand};
+ cursor: pointer;
+`;
+const PageContainer = styled.div`
+ margin-top: -20px;
+`;
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+ padding: 20px 20px 40px 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 60px;
+ padding: 60px 0px 0px 0px;
+ `)}
+`;
+
+const SpiceAuctionDetails = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 60px;
+ `)}
+`;
+
+const SpiceAuction = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const SpiceAuctionTitle = styled.h2`
+ display: flex;
+ align-items: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+ gap: 15px;
+ margin: 0px;
+ font-size: 28px;
+ line-height: 52px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 36px;
+ line-height: 67px;
+ `)}
+`;
+
+const CurrentAuction = styled.div`
+ display: flex;
+ flex-direction: column;
+ border-top: solid ${({ theme }) => theme.palette.brandDark} 2px;
+ border-bottom: solid ${({ theme }) => theme.palette.brandDark} 2px;
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 32px;
+`;
+
+const CurrentAddress = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ text-decoration: underline;
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ gap: 32px;
+ flex-direction: column;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ align-items: center;
+ gap: 20px;
+ `)}
+`;
+
+const HeaderLeft = styled.div`
+ display: flex;
+ align-items: center;
+ gap: 20px;
+ padding: 15px 0px;
+`;
+
+const Left = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+`;
+
+const Right = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 8px;
+`;
+
+const HeaderRight = styled.div`
+ display: flex;
+ justify-content: center;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 12px;
+ justify-content: flex-end;;
+ `)}
+`;
+
+const HeaderRightContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ background: ${({ theme }) => theme.palette.black};
+ border: solid 1px #588f22;
+ border-radius: 10px;
+ padding: 8px 24px 8px 24px;
+ gap: 10px;
+ width: 305px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 100%;
+ flex-direction: row;
+ width: 100%;
+ height: 45px;
+ `)}
+`;
+
+const AuctionStatus = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ font-size: 16px;
+ line-height: 19px;
+ gap: 8px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const TimeStamp = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ font-size: 16px;
+ line-height: 19px;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const Active = styled(active)``;
+
+const Scheduled = styled(scheduled)``;
+
+const CurrentAuctionTitle = styled.h3`
+ display: flex;
+ white-space: nowrap;
+ font-size: 24px;
+ line-height: 44px;
+ text-align: left;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const Epoch = styled.div`
+ display: flex;
+ white-space: nowrap;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ padding: 8px;
+ background: ${({ theme }) => theme.palette.black};
+ gap: 10px;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const Status = styled.div`
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ gap: 8px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 40px;
+ `)}
+`;
+
+const StatusContent = styled.div`
+ display: flex;
+ flex: 1 1 30%;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ height: 136px;
+ width: 305px;
+ white-space: nowrap;
+ border: solid 1px ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ background: ${({ theme }) => theme.palette.black};
+ padding: 20px 10px 20px 10px;
+ gap: 12px;
+ margin: auto;
+
+ ${breakpoints.phoneAndAbove(`
+ min-width: 250px;
+ max-width: 50%;
+ `)}
+`;
+
+const StatusTitle = styled.p`
+ margin: 0px;
+ font-size: 16px;
+ line-height: 19px;
+ text-align: center;
+ text-wrap: balance;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const StatusValue = styled.p`
+ margin: 0px;
+ font-size: 24px;
+ font-weight: 700;
+ line-height: 29px;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const StatusLink = styled.a`
+ margin: 0px;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ text-align: center;
+ text-decoration: underline;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const ChartContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 20px 20px 20px 20px;
+ gap: 40px;
+ background: ${({ theme }) => theme.palette.black};
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+`;
+
+const ChartTitle = styled.div`
+ color: ${({ theme }) => theme.palette.brand};
+ font-weight: 700;
+ font-size: 16px;
+ line-height: 19px;
+ margin-left: 20px;
+`;
+
+const AuctionsHistoryContainer = styled.div``;
+
+const ButtonContainer = styled.div`
+ display: flex;
+ justify-content: center;
+`;
+
+export const TradeButton = styled(Button)`
+ padding: 12px 20px 12px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark};
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4);
+ border-radius: 10px;
+ font-size: 16px;
+ line-height: 19px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/Table.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/Table.tsx
new file mode 100644
index 000000000..cecbbdf91
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/Table.tsx
@@ -0,0 +1,91 @@
+import styled from 'styled-components';
+import { DataTable } from './DataTable';
+
+export type Transaction = {
+ epoch: number;
+ status: 'Finished' | 'Started' | 'Scheduled' | 'Not yet started';
+ auctionStartDate: string;
+ auctionEndDate: string;
+ amountTGLD: string;
+ priceRatio: string;
+};
+
+const data: Transaction[] = [
+ {
+ epoch: 1,
+ status: 'Finished',
+ auctionStartDate: '2024-10-18 23:22:59 CST',
+ auctionEndDate: '2024-10-13 23:22:59 CST',
+ amountTGLD: '20,832.81 TGLD',
+ priceRatio: '5.42 DAI',
+ },
+ {
+ epoch: 2,
+ status: 'Finished',
+ auctionStartDate: '2024-10-18 23:22:59 CST',
+ auctionEndDate: '2024-09-18 23:22:59 CST',
+ amountTGLD: '20,832.81 TGLD',
+ priceRatio: '5.42 DAI',
+ },
+ {
+ epoch: 3,
+ status: 'Started',
+ auctionStartDate: '2024-10-16 23:22:59 CST',
+ auctionEndDate: '-',
+ amountTGLD: '18,000.00 TGLD',
+ priceRatio: '-',
+ },
+ {
+ epoch: 4,
+ status: 'Started',
+ auctionStartDate: '2024-10-14 23:22:59 CST',
+ auctionEndDate: '-',
+ amountTGLD: '18,000.00 TGLD',
+ priceRatio: '-',
+ },
+ {
+ epoch: 5,
+ status: 'Scheduled',
+ auctionStartDate: '2024-09-15 23:22:59 CST',
+ auctionEndDate: '-',
+ amountTGLD: '22,500.00 TGLD',
+ priceRatio: '-',
+ },
+ {
+ epoch: 6,
+ status: 'Scheduled',
+ auctionStartDate: '2024-09-15 23:22:59 CST',
+ auctionEndDate: '-',
+ amountTGLD: '22,500.00 TGLD',
+ priceRatio: '-',
+ },
+ {
+ epoch: 7,
+ status: 'Not yet started',
+ auctionStartDate: '-',
+ auctionEndDate: '-',
+ amountTGLD: '-',
+ priceRatio: '-',
+ },
+ {
+ epoch: 8,
+ status: 'Not yet started',
+ auctionStartDate: '-',
+ auctionEndDate: '-',
+ amountTGLD: '-',
+ priceRatio: '-',
+ },
+];
+
+export const AuctionsHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Table/DataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Table/DataTable.tsx
new file mode 100644
index 000000000..885388e66
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Table/DataTable.tsx
@@ -0,0 +1,301 @@
+import React, { useEffect, useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import styled from 'styled-components';
+import { PaginationControl } from 'components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl';
+import { Transaction } from './Table';
+import { BidTGLD } from '../BidTGLD';
+import { Popover } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Popover';
+import { Button } from 'components/Button/Button';
+import * as breakpoints from 'styles/breakpoints';
+
+enum TableHeaders {
+ Status = 'Status',
+ AuctionName = 'Auction Name',
+ TotalVolume = 'Total Volume',
+ FloorPrice = 'Floor Price',
+ BestOffer = 'Best Offer',
+ Links = '',
+}
+
+type TableProps = {
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+const ROWS_PER_PAGE = 5;
+
+export const DataTable: React.FC = ({
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const tableHeaders = [
+ { name: TableHeaders.Status },
+ { name: TableHeaders.AuctionName },
+ { name: TableHeaders.TotalVolume },
+ { name: TableHeaders.FloorPrice },
+ { name: TableHeaders.BestOffer },
+ { name: TableHeaders.Links },
+ ];
+ const [modal, setModal] = useState<'closed' | 'bidTgld'>('closed');
+ const [filter, setFilter] = useState('Last 30 Days');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+ const [currentPage, setCurrentPage] = useState(1);
+
+ const navigate = useNavigate();
+
+ const filterOptions = ['Last Week', 'Last 30 Days', 'All'];
+
+ useEffect(() => {
+ const newFilteredTransactions = transactions.filter((transaction) => {
+ // Extracting the date from the status string
+ const statusParts = transaction.status.split(' at ');
+ const auctionEndDateString = statusParts[statusParts.length - 1]; // Geting the last part which contains the date
+ const auctionEndDate = new Date(auctionEndDateString);
+
+ const today = new Date();
+ const thirtyDaysAgo = new Date();
+ thirtyDaysAgo.setDate(today.getDate() - 30);
+
+ if (filter === 'Last Week') {
+ const startOfWeek = new Date();
+ startOfWeek.setDate(today.getDate() - today.getDay());
+ return auctionEndDate >= startOfWeek && auctionEndDate <= today;
+ }
+ if (filter === 'Last 30 Days') {
+ return auctionEndDate >= thirtyDaysAgo && auctionEndDate <= today;
+ }
+ return true;
+ });
+
+ setFilteredTransactions(newFilteredTransactions);
+ setCurrentPage(1);
+ }, [filter, transactions]);
+
+ const indexOfLastTransaction = currentPage * ROWS_PER_PAGE;
+ const indexOfFirstTransaction = indexOfLastTransaction - ROWS_PER_PAGE;
+ const currentTransactions = filteredTransactions.slice(
+ indexOfFirstTransaction,
+ indexOfLastTransaction
+ );
+
+ const totalPages = Math.ceil(filteredTransactions.length / ROWS_PER_PAGE);
+
+ return (
+ <>
+
+
+ Auctions History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+
+ {tableHeaders.map((h) => (
+ {h.name}
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : currentTransactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ currentTransactions.map((transaction) => (
+
+ {transaction.status}
+ {transaction.auctionName}
+ {transaction.totalVolume} ETH
+ {transaction.floorPrice} TGLD
+ {transaction.bestOffer} TGLD
+
+
+ navigate(transaction.details)}
+ style={{ whiteSpace: 'nowrap', margin: 0 }}
+ >
+ Details
+
+ setModal('bidTgld')}
+ style={{ whiteSpace: 'nowrap', margin: 0 }}
+ >
+ BID
+
+
+
+
+ ))
+ )}
+
+
+
+
+
+ setModal('closed')}
+ closeOnClickOutside
+ showCloseButton
+ >
+
+
+ >
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 10px;
+ `)}
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ flex-direction: column;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ font-size: 16px;
+ line-height: 19px;
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableWrapper = styled.div`
+ overflow-x: scroll;
+ padding-bottom: 20px;
+ scrollbar-width: thin;
+ scrollbar-color: #58321a #95613f;
+
+ &::-webkit-scrollbar {
+ height: 8px;
+ background: transparent;
+ border-radius: 8px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: linear-gradient(to right, #58321a 20%, #95613f 84.5%);
+ margin: 2px 82px 2px 2px;
+ }
+
+ &::-webkit-scrollbar-track {
+ border: 1px solid #351f11;
+ border-radius: 8px;
+ }
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px;
+ min-width: 980px;
+ border-collapse: collapse;
+ width: 100%;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ color: ${({ theme }) => theme.palette.brand};
+ position: sticky;
+ top: 0;
+ z-index: 1;
+`;
+
+const DataRow = styled.tr``;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+
+ &:last-child {
+ text-align: right;
+ }
+`;
+
+const ButtonsContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ align-items: center;
+ gap: 10px;
+ width: 100%;
+`;
+
+const TradeButton = styled(Button)`
+ padding: 10px 20px 10px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark}; //if button is not active this is not used
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4); //if button is not active this is not used
+ border-radius: 10px;
+ font-weight: 700;
+ font-size: 12px;
+ line-height: 18px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Table/Table.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Table/Table.tsx
new file mode 100644
index 000000000..66c384381
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Table/Table.tsx
@@ -0,0 +1,91 @@
+import styled from 'styled-components';
+import { DataTable } from './DataTable';
+
+export type Transaction = {
+ status: string;
+ auctionName: string;
+ totalVolume: number;
+ floorPrice: number;
+ bestOffer: number;
+ details: string;
+ bid: string;
+};
+
+const data: Transaction[] = [
+ {
+ status: 'Upcoming 2024-11-13 23:22:59 CST',
+ auctionName: 'Spice 1',
+ totalVolume: 1848,
+ floorPrice: 0.1097,
+ bestOffer: 0.0819,
+ details: 'details',
+ bid: '',
+ },
+ {
+ status: 'Upcoming 2024-11-13 23:22:59 CST',
+ auctionName: 'Spice 1',
+ totalVolume: 1848,
+ floorPrice: 0.1097,
+ bestOffer: 0.0819,
+ details: 'details',
+ bid: '',
+ },
+ {
+ status: 'Upcoming 2024-10-13 23:22:59 CST',
+ auctionName: 'Spice 1',
+ totalVolume: 1848,
+ floorPrice: 0.1097,
+ bestOffer: 0.0819,
+ details: 'details',
+ bid: '',
+ },
+ {
+ status: 'Upcoming 2024-10-13 23:22:59 CST',
+ auctionName: 'Spice 1',
+ totalVolume: 1848,
+ floorPrice: 0.1097,
+ bestOffer: 0.0819,
+ details: 'details',
+ bid: '',
+ },
+ {
+ status: 'Ends in 00:15:03:04 at 2024-10-13 23:22:59 CST',
+ auctionName: 'Spice 1',
+ totalVolume: 1848,
+ floorPrice: 0.1097,
+ bestOffer: 0.0819,
+ details: 'details',
+ bid: '',
+ },
+ {
+ status: 'Closed at 2024-10-13 23:22:59 CST',
+ auctionName: 'Spice 1',
+ totalVolume: 1848,
+ floorPrice: 0.1097,
+ bestOffer: 0.0819,
+ details: 'details',
+ bid: '',
+ },
+ {
+ status: 'Closed at 2024-10-13 23:22:59 CST',
+ auctionName: 'Spice 1',
+ totalVolume: 1848,
+ floorPrice: 0.1097,
+ bestOffer: 0.0819,
+ details: 'details',
+ bid: '',
+ },
+];
+
+export const AuctionsHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/TopNav.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/TopNav.tsx
new file mode 100644
index 000000000..0544bf67a
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/TopNav.tsx
@@ -0,0 +1,74 @@
+import { useEffect, useState } from 'react';
+import { useLocation } from 'react-router-dom';
+import { TopNav } from 'components/Pages/Core/DappPages/SpiceBazaar/components/TopNav';
+import { MobileTopNavSecondary } from 'components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNavSecondary';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+enum BidLocPaths {
+ Bid = '/dapp/spice/bid',
+}
+
+const BidConfig = [
+ {
+ label: 'Spice Auctions',
+ linkTo: BidLocPaths.Bid,
+ },
+];
+
+export const BidTopNav = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+ const loc = useLocation();
+ const [menuNavItems, setMenuNavItems] = useState(
+ BidConfig.map((item) => ({
+ label: item.label,
+ path: item.linkTo,
+ selected: item.linkTo === loc.pathname,
+ }))
+ );
+
+ useEffect(() => {
+ setMenuNavItems((prevMenuNavItems) =>
+ prevMenuNavItems.map((menuItem) => ({
+ ...menuItem,
+ selected: menuItem.path === loc.pathname,
+ }))
+ );
+ }, [loc.pathname]);
+
+ const onSelectMenuNavItems = (selectedMenuItem: { label: string }) => {
+ setMenuNavItems(
+ menuNavItems.map((item) => {
+ if (item.label === selectedMenuItem.label) {
+ return { ...item, selected: true };
+ }
+ return { ...item, selected: false };
+ })
+ );
+ };
+
+ return (
+ <>
+ {isPhoneOrAbove ? (
+
+ ) : (
+
+ )}
+ >
+ );
+};
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/index.tsx
new file mode 100644
index 000000000..834f8929b
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/index.tsx
@@ -0,0 +1,299 @@
+import styled from 'styled-components';
+import active from 'assets/icons/active.svg?react';
+import scheduled from 'assets/icons/scheduled.svg?react';
+import { BidTopNav } from './TopNav';
+import { AuctionsHistory } from './Table/Table';
+import * as breakpoints from 'styles/breakpoints';
+
+export const Bid = () => {
+ return (
+
+
+
+
+
+ Spice Auctions
+
+
+
+
+
+ Spice 2
+
+
+ Epoch 2
+
+
+
+
+
+
+
+ 70.530 KAMI
+
+
+ Total amount currently in auction
+
+
+
+
+
+ ACTIVE
+
+ 00:15:03:04
+
+
+
+
+
+
+
+ Spice 5
+
+
+ Epoch 3
+
+
+
+
+
+
+
+ 85.000 ENA
+
+
+ Total amount currently in auction
+
+
+
+
+
+ ACTIVE
+
+ 00:15:03:04
+
+
+
+
+
+
+
+ Spice 2
+
+
+ Epoch 2
+
+
+
+
+
+
+
+ 40.320 KAMI
+
+ Total amount to be auctioned
+
+
+
+ UPCOMING AUCTION
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ margin-top: -20px;
+`;
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 60px;
+ margin-top: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ margin-top: 60px;
+ `)}
+`;
+
+const SpiceAuctions = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const SpiceTitle = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 15px;
+`;
+
+const SpiceTitleText = styled.h2`
+ font-size: 36px;
+ line-height: 67px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const Status = styled.div`
+ display: flex;
+ gap: 20px;
+ flex-direction: column;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const StatusContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ padding: 12px 20px 20px 20px;
+ gap: 20px;
+ border-radius: 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+`;
+
+const StatusHeader = styled.div`
+ display: flex;
+ width: 100%;
+ flex-direction: row;
+ justify-content: flex-end;
+ gap: 8px;
+`;
+const AuctionName = styled.div`
+ padding: 8px;
+ border-radius: 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.black};
+`;
+
+const AuctionNameText = styled.p`
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const Epoch = styled.div`
+ display: flex;
+ align-items: center;
+ padding: 8px;
+ border-radius: 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.black};
+`;
+
+const EpochText = styled.p`
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const StatusBody = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+`;
+
+const AmountInAuction = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 4px;
+`;
+
+const AmountInAuctionIcon = styled.div`
+ display: flex;
+ width: 42px;
+ height: 42px;
+`;
+
+const AmountInActionSum = styled.h3`
+ font-size: 24px;
+ line-height: 44px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const TotalAmountText = styled.p`
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ text-align: center;
+ white-space: nowrap;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const AuctionStatus = styled.div`
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 43px;
+ padding: 8px;
+ gap: 8px;
+ border-radius: 10px;
+ background: ${({ theme }) => theme.palette.black};
+`;
+
+const Active = styled(active)``;
+
+const Scheduled = styled(scheduled)``;
+
+const LiveContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 8px;
+`;
+
+const ActiveContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 8px;
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 15px;
+ text-align: left;
+ color: #588f22;
+`;
+
+const ScheduledContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 15px;
+ gap: 8px;
+`;
+
+const AuctionTimeStamp = styled.div`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 15px;
+ color: #588f22;
+`;
+
+const AuctionsHistoryContainer = styled.div``;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/BidDai.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/BidDai.tsx
new file mode 100644
index 000000000..da3e86c74
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/BidDai.tsx
@@ -0,0 +1,248 @@
+import styled from 'styled-components';
+import { TradeButton } from 'components/Pages/Core/NewUI/Home';
+import dai from 'assets/icons/Dai.svg?react';
+import templeGold from 'assets/icons/temple-gold.svg?react';
+import { Input } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Input';
+
+export const BidDai = () => {
+ return (
+
+
+ BID DAI
+
+
+
+
+
+ 70.53 DAI
+ AVAILABLE
+
+
+
+
+ Your Bid Amount
+
+
+
+
+ You will receive
+
+
+ 1 TGLD
+
+
+ at the current TGLD priece of 5.32 DAI per{' '}
+ TGLD
+
+
+
+
+ i
+
+ Current TGLD price may rise before the end of the auction.
+ Once submitted, the bid cannot be withdrawn or cancelled.
+
+ console.log('clicked')}
+ >
+ SUBMIT BID
+
+
+
+ );
+};
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ flex-grow: 1;
+ gap: 32px;
+`;
+
+const TitleContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ height: 77px;
+ width: 624px;
+ justify-content: center;
+ align-items: center;
+ background: ${({ theme }) => theme.palette.gradients.grey};
+`;
+
+const Title = styled.h3`
+ diplay: flex;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 28px;
+ font-weight: 400;
+ line-height: 52px;
+ text-align: center;
+ margin: 0px;
+`;
+
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 450px;
+ align-items: center;
+ flex-grow: 1;
+ padding: 8px 0px 8px 0px;
+ gap: 24px;
+`;
+
+const AvailableAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ width: 450px;
+ gap: 10px;
+`;
+
+const DaiIcon = styled(dai)`
+ width: 42px;
+ height: 42px;
+`;
+
+const AvailableAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const AvailableAmount = styled.h3`
+ font-weight: 400;
+ font-size: 28px;
+ line-height: 52px;
+ font-weight: 400;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const AvailableText = styled.div`
+ font-size: 16px;
+ font-weight: 700;
+ line-height: 19px;
+ letter-spacing: 0.05em;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const BidContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ border-top: 2px solid ${({ theme }) => theme.palette.brand};
+ border-bottom: 2px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 32px;
+`;
+
+const BidContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const TitleBid = styled.div`
+ font-weight: 400;
+ font-size: 16px;
+ line-height: 19px;
+ letter-spacing: -0.02em;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmountContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 100%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ background: ${({ theme }) => theme.palette.black};
+ gap: 20px;
+ padding: 16px;
+`;
+
+const TempleGoldIcon = styled(templeGold)``;
+
+const ReceiveContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 20px;
+`;
+
+const ReceiveTextTop = styled.div`
+ font-weight: 400;
+ letter-spacing: -0.02em;
+ font-size: 18px;
+ line-height: 21px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveTextBottom = styled.div`
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 19px;
+ letter-spacing: 0.05em;
+ span {
+ font-weight: 700;
+ }
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmount = styled.h3`
+ line-height: 52px;
+ font-size: 28px;
+ line-height: 52px;
+ font-weight: 400;
+ color: ${({ theme }) => theme.palette.gold};
+ margin: 0px;
+`;
+
+const InfoCircle = styled.div`
+ display: flex;
+ margin: 0.25rem;
+ padding: 0.5rem;
+ align-items: center;
+ justify-content: center;
+ width: 1.25rem;
+ height: 1.25rem;
+ font-size: 1rem;
+ font-weight: 600;
+ border-radius: 50%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const WarningMessage = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ border: 2px solid transparent;
+ border-image-source: linear-gradient(
+ 180deg,
+ rgba(149, 97, 63, 0.1) 0%,
+ rgba(255, 255, 255, 0) 100%
+ );
+ border-image-slice: 1;
+ border-radius: 6px;
+ padding: 10px 0px 10px 10px;
+ gap: 10px;
+ background: #24272c;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/BidUSDS.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/BidUSDS.tsx
new file mode 100644
index 000000000..6bd69f907
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/BidUSDS.tsx
@@ -0,0 +1,324 @@
+import styled from 'styled-components';
+import { TradeButton } from '../StakeTemple/Stake';
+import usds from 'assets/icons/usds.svg?react';
+import templeGold from 'assets/icons/temple-gold.svg?react';
+import { Input } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Input';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+import { useWallet } from 'providers/WalletProvider';
+import { TICKER_SYMBOL } from 'enums/ticker-symbol';
+import { formatToken } from 'utils/formatter';
+import { useEffect, useState } from 'react';
+import { useSpiceBazaar } from 'providers/SpiceBazaarProvider';
+import { formatBigNumber } from 'components/Vault/utils';
+import { ZERO } from 'utils/bigNumber';
+import { getTokenInfo } from 'components/Vault/utils';
+
+export const BidDai = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ const {
+ daiGoldAuctions: { bid },
+ } = useSpiceBazaar();
+
+ const { balance, updateBalance } = useWallet();
+
+ useEffect(() => {
+ updateBalance();
+ }, [updateBalance]);
+
+ const handleBidClick = async (value: string) => {
+ await bid(value);
+ setInputValue('');
+ };
+
+ const handleHintClick = () => {
+ const amount = balance.DAI.eq(ZERO)
+ ? ''
+ : formatBigNumber(balance.DAI, getTokenInfo(TICKER_SYMBOL.DAI).decimals);
+ setInputValue(amount);
+ };
+
+ const [inputValue, setInputValue] = useState('');
+
+ const handleInputChange = (value: string) => {
+ setInputValue(value);
+ };
+
+ return (
+
+
+ BID USDS
+
+
+
+
+
+
+ {!balance?.DAI
+ ? '0'
+ : formatToken(balance.DAI, TICKER_SYMBOL.DAI)}
+
+ AVAILABLE
+
+
+
+
+ Your Bid Amount
+
+
+
+
+ You will receive
+
+
+ 1 TGLD
+
+
+ at the current TGLD priece of {!isPhoneOrAbove &&
}
+ 5.32 USDS per TGLD
+
+
+
+
+ i
+
+
+
+ Current TGLD price may rise before the end of the auction.
+
+
+ Once submitted, the bid cannot be withdrawn or cancelled.
+
+
+
+ handleBidClick(inputValue)}
+ disabled={!inputValue}
+ >
+ SUBMIT BID
+
+
+
+ );
+};
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ flex-grow: 1;
+ gap: 32px;
+ max-width: 393px;
+ padding: 0px 16px 0px 16px;
+
+ ${breakpoints.phoneAndAbove(`
+ max-width: 100%;
+ padding: 0px 0px 0px 0px;
+ `)}
+`;
+
+const TitleContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ height: 77px;
+ width: 100%;
+ justify-content: center;
+ align-items: center;
+ background: ${({ theme }) => theme.palette.gradients.grey};
+
+ ${breakpoints.phoneAndAbove(`
+ width: 624px;
+ `)}
+`;
+
+const Title = styled.h3`
+ diplay: flex;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ text-align: center;
+ margin: 0px;
+`;
+
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ padding: 8px 0px 8px 0px;
+ gap: 24px;
+ width: 360px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const AvailableAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const USDSIcon = styled(usds)`
+ width: 42px;
+ height: 42px;
+`;
+
+const AvailableAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const AvailableAmount = styled.h3`
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const AvailableText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const BidContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ border-top: 2px solid ${({ theme }) => theme.palette.brand};
+ border-bottom: 2px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 32px;
+`;
+
+const BidContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const TitleBid = styled.div`
+ font-weight: 400;
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmountContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 100%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ background: ${({ theme }) => theme.palette.black};
+ gap: 20px;
+ padding: 16px;
+`;
+
+const TempleGoldIcon = styled(templeGold)``;
+
+const ReceiveContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 20px;
+`;
+
+const ReceiveTextTop = styled.div`
+ font-weight: 400;
+ font-size: 18px;
+ line-height: 21px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveTextBottom = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmount = styled.h3`
+ line-height: 52px;
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.gold};
+ margin: 0px;
+`;
+
+const InfoCircle = styled.div`
+ display: flex;
+ margin: 0.25rem;
+ padding: 0.5rem;
+ align-items: center;
+ justify-content: center;
+ width: 1.25rem;
+ height: 1.25rem;
+ font-size: 1rem;
+ font-weight: 600;
+ border-radius: 50%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const MessageText = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const Text = styled.p`
+ margin: 0px;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
+
+const WarningMessage = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ border: 2px solid transparent;
+ border-image-source: linear-gradient(
+ 180deg,
+ rgba(149, 97, 63, 0.1) 0%,
+ rgba(255, 255, 255, 0) 100%
+ );
+ border-image-slice: 1;
+ border-radius: 6px;
+ padding: 10px 0px 10px 10px;
+ gap: 8px;
+ background: #24272c;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Chart/Chart.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Chart/Chart.tsx
new file mode 100644
index 000000000..9027552b4
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Chart/Chart.tsx
@@ -0,0 +1,65 @@
+import { useEffect, useState } from 'react';
+import styled, { useTheme } from 'styled-components';
+import { format, subDays } from 'date-fns';
+import LineChart from './LineChart';
+import Loader from 'components/Loader/Loader';
+import { formatNumberAbbreviated } from 'utils/formatter';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+type XAxisTickFormatter = (timestamp: number) => string;
+
+const tickFormatter: XAxisTickFormatter = (timestamp) =>
+ format(new Date(timestamp), 'MMM dd');
+
+type Metric = { timestamp: number; price: number };
+
+const pricesLast7Days = [
+ { timestamp: subDays(new Date(), 6).getTime(), price: 5.32 },
+ { timestamp: subDays(new Date(), 5).getTime(), price: 5.3 },
+ { timestamp: subDays(new Date(), 4).getTime(), price: 5.3 },
+ { timestamp: subDays(new Date(), 3).getTime(), price: 5.36 },
+ { timestamp: subDays(new Date(), 2).getTime(), price: 5.36 },
+ { timestamp: subDays(new Date(), 1).getTime(), price: 5.34 },
+ { timestamp: new Date().getTime(), price: 5.45 },
+];
+
+export const Chart = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+ const [metrics, setMetrics] = useState([]);
+ const theme = useTheme();
+
+ useEffect(() => {
+ isPhoneOrAbove
+ ? setMetrics(pricesLast7Days)
+ : setMetrics(pricesLast7Days.filter((_, index) => index % 2 === 0));
+ }, []);
+
+ if (!metrics.length) return ;
+
+ return (
+
+
+ `${formatNumberAbbreviated(val).number.toFixed(2)}\u00A0USDS`
+ }
+ tooltipLabelFormatter={tickFormatter}
+ yDomain={[5.3, 5.45]}
+ tooltipValuesFormatter={(value) => [
+ `${value.toFixed(2)} USDS`,
+ 'Price',
+ ]}
+ />
+
+ );
+};
+
+const PageContainer = styled.div`
+ height: 100%;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Chart/LineChart.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Chart/LineChart.tsx
new file mode 100644
index 000000000..f22d6ee72
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Chart/LineChart.tsx
@@ -0,0 +1,209 @@
+import type { DataKey, AxisDomain } from 'recharts/types/util/types';
+
+import React, { useState } from 'react';
+import { useTheme } from 'styled-components';
+import {
+ CartesianGrid,
+ ResponsiveContainer,
+ Line,
+ XAxis,
+ YAxis,
+ Tooltip,
+ Legend,
+ ComposedChart,
+ Area,
+} from 'recharts';
+import { formatNumberAbbreviated } from 'utils/formatter';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+type LineChartProps = {
+ chartData: T[];
+ xDataKey: DataKey;
+ lines: { series: DataKey; color: string; hide?: boolean }[];
+ stackedItems?: {
+ series: string;
+ color: string;
+ stackId: string;
+ hide?: boolean;
+ }[];
+ xTickFormatter: (xValue: any, index: number) => string;
+ yTickFormatter?: (yValue: any, index: number) => string;
+ tooltipLabelFormatter: (value: any) => string;
+ tooltipValuesFormatter?: (value: number, name: string) => string[];
+ legendFormatter?: (value: string) => string;
+ yDomain?: AxisDomain;
+ onLegendClick?: (key: string) => void;
+};
+
+export default function LineChart(
+ props: React.PropsWithChildren>
+) {
+ const {
+ chartData,
+ xDataKey,
+ lines,
+ stackedItems,
+ xTickFormatter,
+ yTickFormatter,
+ tooltipLabelFormatter,
+ tooltipValuesFormatter,
+ legendFormatter,
+ yDomain,
+ } = props;
+ const theme = useTheme();
+
+ const [hiddenLines, setHiddenLines] = useState({
+ ...Object.fromEntries(
+ lines.map((s) => [s.series.toString(), s.hide || false])
+ ),
+ ...Object.fromEntries(
+ stackedItems?.map((s) => [s.series.toString(), s.hide || false]) ?? []
+ ),
+ });
+
+ const toggleLineVisibility = (key: string) => {
+ //there must be always at least one visible line
+ // otherwise the chart breaks
+ const nextState = {
+ ...hiddenLines,
+ [key]: !hiddenLines[key],
+ };
+
+ const totalLines = Object.values(hiddenLines).length;
+ const wouldBeHiddenLinesCount = Object.values(nextState).reduce(
+ (hiddenCount, isHidden) => (isHidden ? hiddenCount + 1 : hiddenCount),
+ 0
+ );
+
+ if (totalLines - wouldBeHiddenLinesCount === 0) {
+ return;
+ }
+ setHiddenLines(nextState);
+ };
+
+ const isDesktop = useMediaQuery({
+ query: queryPhone,
+ });
+ return (
+
+
+
+ {stackedItems?.map((item) => (
+
+ ))}
+ {lines.map((line) => (
+
+ ))}
+
+ yTickFormatter(val, i)
+ : (value) => formatNumberAbbreviated(value).string
+ }
+ tick={{
+ fill: theme.palette.brandLight,
+ style: {
+ fontSize: '12px',
+ fontWeight: '700',
+ lineHeight: '18px',
+ letterSpacing: '0.05em',
+ },
+ }}
+ offset={10}
+ domain={yDomain}
+ ticks={[5.3, 5.35, 5.4, 5.45]}
+ tickMargin={20}
+ />
+ {
+ //@ts-ignore
+ return tooltipValuesFormatter(value, name);
+ }
+ : undefined
+ }
+ />
+ {legendFormatter ? (
+
+
+ );
+}
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Table/DataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Table/DataTable.tsx
new file mode 100644
index 000000000..53eb14a68
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Table/DataTable.tsx
@@ -0,0 +1,256 @@
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import { Transaction } from './Table';
+import { PaginationControl } from 'components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl';
+import * as breakpoints from 'styles/breakpoints';
+
+enum TableHeaders {
+ Epoch = 'EPOCH',
+ Status = 'Status',
+ AuctionStartDate = 'Auction Start Date',
+ AuctionEndDate = 'Auction End Date',
+ AmountTGLDAuctioned = 'Amount TGLD Auctioned',
+ PriceRatio = 'Price Ratio',
+}
+
+type TableProps = {
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+const ROWS_PER_PAGE = 3;
+
+export const DataTable: React.FC = ({
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const tableHeaders = [
+ { name: TableHeaders.Epoch },
+ { name: TableHeaders.Status },
+ { name: TableHeaders.AuctionStartDate },
+ { name: TableHeaders.AuctionEndDate },
+ { name: TableHeaders.AmountTGLDAuctioned },
+ { name: TableHeaders.PriceRatio },
+ ];
+
+ const [filter, setFilter] = useState('Last 30 Days');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+ const [currentPage, setCurrentPage] = useState(1);
+
+ const filterOptions = ['Last Week', 'Last 30 Days', 'All'];
+
+ useEffect(() => {
+ const newFilteredTransactions = transactions.filter((transaction) => {
+ const auctionEndDate = new Date(transaction.auctionStartDate);
+ const today = new Date();
+ const thirtyDaysAgo = new Date();
+ thirtyDaysAgo.setDate(today.getDate() - 30);
+
+ if (filter === 'Last Week') {
+ const startOfWeek = new Date();
+ startOfWeek.setDate(today.getDate() - today.getDay());
+ return auctionEndDate >= startOfWeek && auctionEndDate <= today;
+ }
+ if (filter === 'Last 30 Days') {
+ return auctionEndDate >= thirtyDaysAgo && auctionEndDate <= today;
+ }
+ return true;
+ });
+
+ setFilteredTransactions(newFilteredTransactions);
+ setCurrentPage(1);
+ }, [filter, transactions]);
+
+ const indexOfLastTransaction = currentPage * ROWS_PER_PAGE;
+ const indexOfFirstTransaction = indexOfLastTransaction - ROWS_PER_PAGE;
+ const currentTransactions = filteredTransactions.slice(
+ indexOfFirstTransaction,
+ indexOfLastTransaction
+ );
+
+ const totalPages = Math.ceil(filteredTransactions.length / ROWS_PER_PAGE);
+
+ return (
+
+
+ Auctions History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+
+ {tableHeaders.map((h) => (
+ {h.name}
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : currentTransactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ currentTransactions.map((transaction) => (
+
+ {transaction.epoch}
+ {transaction.status}
+
+ {transaction.auctionStartDate !== '-'
+ ? transaction.auctionStartDate
+ : '-'}
+
+
+ {transaction.status === 'Closed'
+ ? transaction.auctionEndDate
+ : '-'}
+
+ {transaction.amountTGLD}
+
+ {transaction.status === 'Closed'
+ ? transaction.priceRatio
+ : '-'}
+
+
+ ))
+ )}
+
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 10px;
+ `)}
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ flex-direction: column;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ font-size: 16px;
+ line-height: 19px;
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableWrapper = styled.div`
+ overflow-x: scroll;
+ padding-bottom: 20px;
+ scrollbar-width: thin;
+ scrollbar-color: #58321a #95613f;
+
+ &::-webkit-scrollbar {
+ height: 8px;
+ background: transparent;
+ border-radius: 8px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: linear-gradient(to right, #58321a 20%, #95613f 84.5%);
+ margin: 2px 82px 2px 2px;
+ }
+
+ &::-webkit-scrollbar-track {
+ border: 1px solid #351f11;
+ border-radius: 8px;
+ }
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px;
+ min-width: 980px;
+ border-collapse: collapse;
+ width: 100%;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ color: ${({ theme }) => theme.palette.brand};
+ position: sticky;
+ top: 0;
+ z-index: 1;
+`;
+
+const DataRow = styled.tr`
+ padding-left: 16px;
+`;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+
+ &:first-child {
+ padding-left: 16px;
+ }
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Table/Table.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Table/Table.tsx
new file mode 100644
index 000000000..424284482
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/Table/Table.tsx
@@ -0,0 +1,91 @@
+import styled from 'styled-components';
+import { DataTable } from './DataTable';
+
+export type Transaction = {
+ epoch: number;
+ status: 'Closed' | 'Active' | 'Upcoming';
+ auctionStartDate: string;
+ auctionEndDate: string;
+ amountTGLD: string;
+ priceRatio: string;
+};
+
+const data: Transaction[] = [
+ {
+ epoch: 1,
+ status: 'Closed',
+ auctionStartDate: '2024-10-13 23:22:59 CST',
+ auctionEndDate: '2024-10-13 23:22:59 CST',
+ amountTGLD: '20,832.81 TGLD',
+ priceRatio: '5.42 DAI',
+ },
+ {
+ epoch: 2,
+ status: 'Closed',
+ auctionStartDate: '2024-10-13 23:22:59 CST',
+ auctionEndDate: '2024-10-13 23:22:59 CST',
+ amountTGLD: '20,832.81 TGLD',
+ priceRatio: '5.42 DAI',
+ },
+ {
+ epoch: 3,
+ status: 'Active',
+ auctionStartDate: '2024-10-18 23:22:59 CST',
+ auctionEndDate: '-',
+ amountTGLD: '18,000.00 TGLD',
+ priceRatio: '-',
+ },
+ {
+ epoch: 4,
+ status: 'Active',
+ auctionStartDate: '2024-10-14 23:22:59 CST',
+ auctionEndDate: '-',
+ amountTGLD: '18,000.00 TGLD',
+ priceRatio: '-',
+ },
+ {
+ epoch: 5,
+ status: 'Upcoming',
+ auctionStartDate: '15.10.24 00:00 CST',
+ auctionEndDate: '-',
+ amountTGLD: '22,500.00 TGLD',
+ priceRatio: '-',
+ },
+ {
+ epoch: 6,
+ status: 'Upcoming',
+ auctionStartDate: '-',
+ auctionEndDate: '-',
+ amountTGLD: '22,500.00 TGLD',
+ priceRatio: '-',
+ },
+ {
+ epoch: 7,
+ status: 'Upcoming',
+ auctionStartDate: '-',
+ auctionEndDate: '-',
+ amountTGLD: '-',
+ priceRatio: '-',
+ },
+ {
+ epoch: 8,
+ status: 'Upcoming',
+ auctionStartDate: '-',
+ auctionEndDate: '-',
+ amountTGLD: '-',
+ priceRatio: '-',
+ },
+];
+
+export const AuctionsHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/index.tsx
new file mode 100644
index 000000000..e6140acf0
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions/index.tsx
@@ -0,0 +1,476 @@
+import { EarnTopNav } from 'components/Pages/Core/DappPages/SpiceBazaar/Earn/TopNav';
+import linkSvg from 'assets/icons/link.svg?react';
+import active from 'assets/icons/active.svg?react';
+import scheduled from 'assets/icons/scheduled.svg?react';
+import styled from 'styled-components';
+import { useEffect, useState } from 'react';
+import { TradeButton } from '../StakeTemple/Stake';
+import { Chart } from './Chart/Chart';
+import { BidDai } from './BidUSDS';
+import { Popover } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Popover';
+import { AuctionsHistory } from './Table/Table';
+import { useSpiceBazaar } from 'providers/SpiceBazaarProvider';
+import { formatNumberWithCommas } from 'utils/formatter';
+import Loader from 'components/Loader/Loader';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+export const Auctions = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+ const [isLive, setIsLive] = useState(true);
+ const [modal, setModal] = useState<'closed' | 'bidDai'>('closed');
+ const [countdown, setCountdown] = useState('');
+
+ const {
+ daiGoldAuctionInfo: {
+ data: daiGoldAuctionInfo,
+ fetch: fetchDaiGoldAuctionInfo,
+ loading: daiGoldAuctionInfoLoading,
+ },
+ } = useSpiceBazaar();
+
+ const calculateTimeLeft = (endTime: number) => {
+ const difference = endTime - Date.now();
+
+ if (difference <= 0) {
+ return '00:00:00:00';
+ }
+
+ const days = Math.floor(difference / (1000 * 60 * 60 * 24));
+ const hours = Math.floor((difference / (1000 * 60 * 60)) % 24);
+ const minutes = Math.floor((difference / 1000 / 60) % 60);
+ const seconds = Math.floor((difference / 1000) % 60);
+
+ return `${days.toString().padStart(2, '0')}:${hours
+ .toString()
+ .padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds
+ .toString()
+ .padStart(2, '0')}`;
+ };
+
+ useEffect(() => {
+ if (!daiGoldAuctionInfo?.auctionEndTime) return;
+
+ const timer = setInterval(() => {
+ setCountdown(calculateTimeLeft(daiGoldAuctionInfo.auctionEndTime));
+ }, 1000);
+
+ return () => clearInterval(timer);
+ }, [daiGoldAuctionInfo?.auctionEndTime]);
+
+ useEffect(() => {
+ const fetchData = async () => {
+ await fetchDaiGoldAuctionInfo();
+ };
+ fetchData();
+ }, [fetchDaiGoldAuctionInfo]);
+
+ return (
+ <>
+
+
+
+
+
+
+ USDS GOLD Auctions
+
+
+
+ In the USDS Gold Auction, submit your{' '}
+ {!isPhoneOrAbove &&
}
+ USDS bid to win TGLD. The more you bid,{' '}
+ {!isPhoneOrAbove &&
}
+ the more TGLD you will earn. Once {!isPhoneOrAbove &&
}
+ placed, Bids cannot be withdrawn, but{' '}
+ {!isPhoneOrAbove &&
}
+ you can add more.
+
+
+
+
+
+ Current Auction
+ {daiGoldAuctionInfoLoading ? (
+
+ ) : (
+ EPOCH {daiGoldAuctionInfo?.currentEpoch}
+ )}
+
+
+ {
+ // TODO: Add logic to detect future auction live vs current live
+ setIsLive(!isLive);
+ }}
+ >
+ {daiGoldAuctionInfoLoading ? (
+
+ ) : isLive ? (
+ <>
+
+
+ ACTIVE
+
+ Ends in {countdown}
+ >
+ ) : (
+ <>
+
+
+ UPCOMING
+
+
+ Scheduled for 05.10.24 at 00:00 CST
+
+ >
+ )}
+
+
+
+
+
+ {daiGoldAuctionInfoLoading ? (
+
+ ) : (
+ <>
+ Price Ratio
+
+ 1 TLGD ={' '}
+ {daiGoldAuctionInfo?.priceRatio < 1
+ ? '<1'
+ : daiGoldAuctionInfo?.priceRatio.toFixed(2)}{' '}
+ USDS
+
+ {
+ e.preventDefault();
+ document
+ .getElementById('auction-history')
+ ?.scrollIntoView({
+ behavior: 'smooth',
+ });
+ }}
+ >
+ View history
+
+ >
+ )}
+
+
+ {daiGoldAuctionInfoLoading ? (
+
+ ) : (
+ <>
+ Amount to be auctioned
+
+ {formatNumberWithCommas(
+ daiGoldAuctionInfo?.totalAuctionTokenAmount
+ )}{' '}
+ TGLD
+
+ >
+ )}
+
+
+ {daiGoldAuctionInfoLoading ? (
+
+ ) : (
+ <>
+ Amount submitted
+
+ {daiGoldAuctionInfo?.totalBidTokenAmount} USDS
+
+ >
+ )}
+
+
+ {isLive ? (
+
+ TGLD Price History
+
+
+ ) : null}
+
+ setModal('bidDai')}
+ style={{ whiteSpace: 'nowrap', margin: 0 }}
+ >
+ BID USDS FOR TGLD
+
+
+
+
+
+
+
+
+
+ setModal('closed')}
+ closeOnClickOutside
+ showCloseButton
+ >
+
+
+ >
+ );
+};
+
+const LinkIcon = styled(linkSvg)`
+ fill: ${({ theme }) => theme.palette.brand};
+ cursor: pointer;
+`;
+
+const PageContainer = styled.div`
+ margin-top: -20px;
+`;
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+ padding: 20px 0px 40px 0px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 60px;
+ padding: 60px 0px 0px 0px;
+ `)}
+`;
+
+const DaiGoldAuctions = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 60px;
+ `)}
+`;
+
+const DaiGold = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const DaiGoldTitle = styled.h2`
+ display: flex;
+ align-items: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+ gap: 15px;
+ margin: 0px;
+ font-size: 28px;
+ line-height: 52px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 36px;
+ line-height: 67px;
+ `)}
+`;
+
+const DaiGoldText = styled.div`
+ font-weight: 700;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 16px;
+ line-height: 19px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 18px;
+ line-height: 22px;
+ `)}
+`;
+
+const CurrentAuction = styled.div`
+ display: flex;
+ flex-direction: column;
+ border-top: solid ${({ theme }) => theme.palette.brandDark} 2px;
+ border-bottom: solid ${({ theme }) => theme.palette.brandDark} 2px;
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 32px;
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ padding: 15px 0px 15px 0px;
+ gap: 20px;
+ flex-direction: column;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const HeaderLeft = styled.div`
+ display: flex;
+ align-items: center;
+ gap: 20px;
+`;
+
+const HeaderRight = styled.div`
+ display: flex;
+ justify-content: center;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 12px;
+ justify-content: flex-end;;
+ `)}
+`;
+
+const HeaderRightContainer = styled.div<{ isLive: boolean }>`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ background: ${({ theme }) => theme.palette.black};
+ border: solid 1px;
+ border-color: ${({ isLive }) => (isLive ? '#588f22' : '#EAB85B')};
+ border-radius: 10px;
+ padding: 16px 24px 16px 24px;
+ gap: 10px;
+ width: 305px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 100%;
+ padding: 8px 24px 8px 24px;
+ `)}
+`;
+
+const AuctionStatus = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ font-size: 16px;
+ line-height: 19px;
+ gap: 8px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const TimeStamp = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ font-size: 16px;
+ line-height: 19px;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const Active = styled(active)``;
+
+const Scheduled = styled(scheduled)``;
+
+const CurrentAuctionTitle = styled.h3`
+ display: flex;
+ white-space: nowrap;
+ font-size: 24px;
+ line-height: 44px;
+ text-align: left;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const Epoch = styled.div`
+ display: flex;
+ white-space: nowrap;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ padding: 8px;
+ background: ${({ theme }) => theme.palette.black};
+ gap: 10px;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const Status = styled.div`
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ gap: 8px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 40px;
+ `)}
+`;
+
+const StatusContent = styled.div`
+ display: flex;
+ flex: 1 1 30%;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ height: 136px;
+ width: 305px;
+ white-space: nowrap;
+ border: solid 1px ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ background: ${({ theme }) => theme.palette.black};
+ padding: 20px 10px 20px 10px;
+ gap: 12px;
+ margin: auto;
+
+ ${breakpoints.phoneAndAbove(`
+ min-width: 250px;
+ max-width: 50%;
+ `)}
+`;
+
+const StatusTitle = styled.p`
+ margin: 0px;
+ font-size: 16px;
+ line-height: 19px;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const StatusValue = styled.p`
+ margin: 0px;
+ font-size: 24px;
+ font-weight: 700;
+ line-height: 29px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const StatusLink = styled.a`
+ margin: 0px;
+ font-size: 12px;
+ font-weight: 700;
+ line-height: 18px;
+ text-align: center;
+ text-decoration: underline;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const ChartContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 20px 20px 20px 20px;
+ gap: 40px;
+ background: ${({ theme }) => theme.palette.black};
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+`;
+
+const ChartTitle = styled.div`
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 16px;
+ line-height: 19px;
+ margin-left: 20px;
+`;
+
+const AuctionsHistoryContainer = styled.div``;
+
+const ButtonContainer = styled.div`
+ display: flex;
+ justify-content: center;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Claim.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Claim.tsx
new file mode 100644
index 000000000..73cca6586
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Claim.tsx
@@ -0,0 +1,7 @@
+export const Claim = () => {
+ return (
+ <>
+ Claim
+ >
+ );
+};
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Stake.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Stake.tsx
new file mode 100644
index 000000000..b1ca1d91e
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Stake.tsx
@@ -0,0 +1,7 @@
+export const Stake = () => {
+ return (
+ <>
+ Stake
+ >
+ );
+};
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Claim.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Claim.tsx
new file mode 100644
index 000000000..b190fab9a
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Claim.tsx
@@ -0,0 +1,97 @@
+import styled from 'styled-components';
+import { TradeButton } from './Stake';
+import templeGold from 'assets/icons/temple-gold.svg?react';
+import { useSpiceBazaar } from 'providers/SpiceBazaarProvider';
+import { formatNumberWithCommas } from 'utils/formatter';
+import Loader from 'components/Loader/Loader';
+
+export const Claim = () => {
+ const {
+ stakePageMetrics: {
+ data: stakePageMetricsData,
+ loading: stakePageMetricsLoading,
+ },
+ staking: { claimRewards },
+ } = useSpiceBazaar();
+
+ const hasRewards = stakePageMetricsData.yourRewards > 0;
+
+ return (
+
+
+ {stakePageMetricsLoading ? (
+
+ ) : (
+ <>
+
+
+
+ {formatNumberWithCommas(stakePageMetricsData.yourRewards)} TGLD
+
+ AVAILABLE
+
+ >
+ )}
+
+ {stakePageMetricsLoading ? (
+
+
+
+ ) : (
+ {
+ await claimRewards();
+ }}
+ disabled={!hasRewards}
+ >
+ CLAIM
+
+ )}
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 32px 10px 32px 10px;
+ gap: 24px;
+`;
+
+const AvailableAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ gap: 15px;
+ width: 450px;
+`;
+
+const TempleGoldIcon = styled(templeGold)``;
+
+const AvailableAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const AvailableAmount = styled.h3`
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.gold};
+ margin: 0px;
+`;
+
+const AvailabilityText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const LoaderContainer = styled.div`
+ height: 43px; // Match the height of the TradeButton
+ display: flex;
+ align-items: center;
+ justify-content: center;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Stake.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Stake.tsx
new file mode 100644
index 000000000..66ab0077a
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Stake.tsx
@@ -0,0 +1,247 @@
+import { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import stakeTemple from 'assets/icons/stake-temple.svg?react';
+import templeGold from 'assets/icons/temple-gold.svg?react';
+import priorityHigh from 'assets/icons/priority-high.svg?react';
+import { Input } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Input';
+import { Button } from 'components/Button/Button';
+import { useWallet } from 'providers/WalletProvider';
+import { formatNumberWithCommas, formatToken } from 'utils/formatter';
+import { TICKER_SYMBOL } from 'enums/ticker-symbol';
+import { formatBigNumber, getTokenInfo } from 'components/Vault/utils';
+import { fromAtto, ZERO } from 'utils/bigNumber';
+import { useSpiceBazaar } from 'providers/SpiceBazaarProvider';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+export const Stake = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ const { balance, updateBalance } = useWallet();
+ const {
+ staking: { stakeTemple },
+ } = useSpiceBazaar();
+
+ useEffect(() => {
+ const onMount = async () => {
+ await updateBalance();
+ };
+ onMount();
+ }, [updateBalance]);
+
+ const handleHintClick = () => {
+ const amount = balance.TEMPLE.eq(ZERO)
+ ? ''
+ : formatBigNumber(
+ balance.TEMPLE,
+ getTokenInfo(TICKER_SYMBOL.TEMPLE_TOKEN).decimals
+ );
+ setInputValue(amount);
+ };
+
+ const [inputValue, setInputValue] = useState('');
+
+ const handleInputChange = async (value: string) => {
+ setInputValue(value);
+ };
+
+ return (
+
+
+
+
+
+ {formatNumberWithCommas(fromAtto(balance.TEMPLE))}
+ TEMPLE
+
+ AVAILABLE
+
+
+
+ Amount to stake
+
+
+ {/* // Hidden per PB
+
+
+ You will receive
+ 1,618 TGLD
+
+ */}
+
+
+ TGLD is non-transferrable.
+ Once submitted, bids cannot be withdrawn {!isPhoneOrAbove &&
} or
+ canceled, {isPhoneOrAbove &&
}
+ and your stake will be locked {!isPhoneOrAbove &&
} for X days
+ before it can be {isPhoneOrAbove &&
}
+ unstaked.
+
+ {
+ await stakeTemple(inputValue);
+ setInputValue('');
+ }}
+ disabled={!inputValue}
+ >
+ SUBMIT
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 32px 10px 32px 10px;
+ gap: 24px;
+`;
+
+const AvailableAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ gap: 15px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const StakeTempleIcon = styled(stakeTemple)``;
+
+const AvailableAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const AvailableAmount = styled.h3`
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const AvailabilityText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const BodyContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ border-top: 2px solid ${({ theme }) => theme.palette.brand};
+ border-bottom: 2px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 8px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+const TitleStake = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 16px;
+ padding: 16px 25px 16px 0px;
+ width: 236px;
+`;
+
+const TempleGoldIcon = styled(templeGold)``;
+
+const ContentReceive = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const ReceiveText = styled.div`
+ font-size: 18px;
+ line-height: 21px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmount = styled.h3`
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.gold};
+ margin: 0px;
+`;
+
+const WarningMessage = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+
+ border: 2px solid transparent;
+ border-image-source: linear-gradient(
+ 180deg,
+ rgba(149, 97, 63, 0.1) 0%,
+ rgba(255, 255, 255, 0) 100%
+ );
+ border-image-slice: 1;
+ border-radius: 6px;
+
+ padding: 10px 10px 10px 10px;
+ gap: 10px;
+ background: #24272c;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 436px;
+ `)}
+`;
+
+const ExclamationIcon = styled(priorityHigh)`
+ min-width: 26px;
+ min-height: 26px;
+`;
+
+export const TradeButton = styled(Button)`
+ padding: 12px 20px 12px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark};
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4);
+ border-radius: 10px;
+ font-size: 16px;
+ line-height: 19px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Unstake.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Unstake.tsx
new file mode 100644
index 000000000..55dc9e95f
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Unstake.tsx
@@ -0,0 +1,242 @@
+import { useState } from 'react';
+import styled from 'styled-components';
+import { TradeButton } from './Stake';
+import stakeTemple from 'assets/icons/stake-temple.svg?react';
+import info from 'assets/icons/info.svg?react';
+import { Input } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Input';
+import RoundCheckbox from 'components/Pages/Core/DappPages/SpiceBazaar/components/RoundCheckBox';
+import { useSpiceBazaar } from 'providers/SpiceBazaarProvider';
+import { formatNumberWithCommas } from 'utils/formatter';
+import { TICKER_SYMBOL } from 'enums/ticker-symbol';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+import Loader from 'components/Loader/Loader';
+import { useUnstakeTime } from 'hooks/spicebazaar/use-unstake-time';
+
+export const Unstake = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ const {
+ stakePageMetrics,
+ staking: { unstakeTemple },
+ } = useSpiceBazaar();
+
+ const { isLoading, countdown, shouldShowCountdown } = useUnstakeTime();
+
+ const [isCheckboxChecked, setIsCheckboxChecked] = useState(false);
+ const handleCheckboxToggle = (checked: boolean) => {
+ setIsCheckboxChecked(checked);
+ };
+
+ const handleHintClick = () => {
+ const amount =
+ stakePageMetrics.data.stakedTemple === 0
+ ? ''
+ : String(stakePageMetrics.data.stakedTemple);
+ setInputValue(amount);
+ };
+
+ const [inputValue, setInputValue] = useState('');
+
+ const handleInputChange = async (value: string) => {
+ setInputValue(value);
+ };
+
+ return (
+ <>
+ {shouldShowCountdown && countdown && (
+
+
+ TIME UNTIL YOU CAN UNSTAKE: {!isPhoneOrAbove &&
}
+ {countdown.days}d {countdown.hours}h {countdown.minutes}m{' '}
+ {countdown.seconds}s
+
+ )}
+
+
+ {isLoading ? (
+
+ ) : (
+ <>
+
+
+
+ {formatNumberWithCommas(stakePageMetrics.data.stakedTemple)}{' '}
+ TEMPLE
+
+ STAKED
+
+ >
+ )}
+
+
+ Amount to unstake
+
+
+
+
+
+ Claim my earned TGLD
+
+
+ {isLoading ? (
+
+
+
+ ) : (
+ {
+ await unstakeTemple(inputValue, isCheckboxChecked);
+ setInputValue('');
+ }}
+ disabled={shouldShowCountdown || !inputValue}
+ >
+ UNSTAKE
+
+ )}
+
+
+ >
+ );
+};
+
+const WarningMessage = styled.div`
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ // align-items: center;
+ width: 85%;
+ gap: 10px;
+ background: #9d4124;
+ border-radius: 6px;
+ border: 2px solid;
+ border-image-source: linear-gradient(
+ 180deg,
+ rgba(149, 97, 63, 0.1) 0%,
+ rgba(255, 255, 255, 0) 100%
+ );
+ padding: 10px 0px 10px 10px;
+ margin-top: 32px;
+ font-size: 13px;
+ line-height: 20px;
+ font-weight: 700;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const InfoIcon = styled(info)`
+ width: 16px;
+ height: 16px;
+`;
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 24px 10px 32px 10px;
+ gap: 24px;
+`;
+
+const StakedAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ gap: 15px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const StakedTempleIcon = styled(stakeTemple)``;
+
+const StakedAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const StakedAmount = styled.h3`
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const StakedText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const BodyContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ border-top: 2px solid ${({ theme }) => theme.palette.brand};
+ border-bottom: 2px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 8px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const TitleUnstake = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ButtonContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+ align-items: center;
+`;
+
+const Message = styled.div`
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ width: 436px;
+ gap: 10px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
+
+const LoaderContainer = styled.div`
+ height: 43px; // Match the height of the TradeButton
+ display: flex;
+ align-items: center;
+ justify-content: center;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/index.tsx
new file mode 100644
index 000000000..1c1446438
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/index.tsx
@@ -0,0 +1,407 @@
+import { useConnectWallet } from '@web3-onboard/react';
+import { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import { Outlet, useLocation, useNavigate } from 'react-router-dom';
+import { useWallet } from 'providers/WalletProvider';
+import linkSvg from 'assets/icons/link.svg?react';
+import { EarnTopNav } from 'components/Pages/Core/DappPages/SpiceBazaar/Earn/TopNav';
+import { Button } from 'components/Button/Button';
+import wallet from 'assets/icons/wallet.svg?react';
+import { useSpiceBazaar } from 'providers/SpiceBazaarProvider';
+import Loader from 'components/Loader/Loader';
+import { formatNumberWithCommas } from 'utils/formatter';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+type ItemProps = {
+ isActive: boolean;
+};
+
+enum StakeTempleLocPaths {
+ Stake = '/dapp/spice/earn/staketemple/stake',
+ Unstake = '/dapp/spice/earn/staketemple/unstake',
+ Claim = '/dapp/spice/earn/staketemple/claim',
+}
+
+const items = [
+ {
+ label: 'STAKE',
+ linkTo: StakeTempleLocPaths.Stake,
+ },
+ {
+ label: 'UNSTAKE',
+ linkTo: StakeTempleLocPaths.Unstake,
+ },
+ {
+ label: 'CLAIM TGLD',
+ linkTo: StakeTempleLocPaths.Claim,
+ },
+];
+
+export const StakeTemple = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ const [activeTab, setActiveTab] = useState(
+ StakeTempleLocPaths.Stake
+ );
+ const navigate = useNavigate();
+ const loc = useLocation();
+
+ const [{}, connect] = useConnectWallet();
+ const { wallet } = useWallet();
+
+ const { stakePageMetrics } = useSpiceBazaar();
+ const {
+ data: stakePageMetricsData,
+ loading: stakePageMetricsLoading,
+ fetch: fetchStakePageMetrics,
+ } = stakePageMetrics;
+
+ // Only fetch on mount and wallet changes
+ useEffect(() => {
+ if (wallet) {
+ fetchStakePageMetrics();
+ }
+ }, [wallet, fetchStakePageMetrics]);
+
+ useEffect(() => {
+ if (loc.pathname) {
+ setActiveTab(loc.pathname as StakeTempleLocPaths);
+ }
+ }, [loc.pathname]);
+
+ const handleTabClick = (linkTo: string) => {
+ setActiveTab(linkTo as StakeTempleLocPaths);
+ navigate(linkTo.toLowerCase());
+ };
+
+ return (
+
+
+
+
+
+
+ Stake TEMPLE
+
+
+
+ Staking TEMPLE tokens boosts your TGLD {!isPhoneOrAbove &&
}
+ rewards over time—25% after 4 weeks, {!isPhoneOrAbove &&
}
+ 50% after 6 weeks, and full rewards after{' '}
+ {!isPhoneOrAbove &&
}
+ 12 weeks. Each stake is independent, so{' '}
+ {!isPhoneOrAbove &&
}
+ reward rates vary based on individual {!isPhoneOrAbove &&
}
+ vesting schedules.
+
+
+
+
+
+ {stakePageMetricsLoading ? (
+
+ ) : (
+ <>
+
+ $
+ {formatNumberWithCommas(
+ stakePageMetricsData.stakedTemple
+ )}
+
+ Total Staked (TEMPLE)
+ >
+ )}
+
+
+ {stakePageMetricsLoading ? (
+
+ ) : (
+ <>
+
+ {formatNumberWithCommas(
+ stakePageMetricsData.totalEpochRewards
+ )}
+ TGLD
+
+ Total EPOCH Rewards
+ >
+ )}
+
+
+
+
+ {stakePageMetricsLoading ? (
+
+ ) : (
+ <>
+
+ {formatNumberWithCommas(stakePageMetricsData.yourStake)}
+ TEMPLE
+
+ Your Stake
+ >
+ )}
+
+
+ {stakePageMetricsLoading ? (
+
+ ) : (
+ <>
+
+ {formatNumberWithCommas(stakePageMetricsData.yourRewards)}
+ TGLD
+
+ Claimable Rewards
+ >
+ )}
+
+
+
+
+
+
+
+ {wallet ? (
+
+ ) : (
+ {
+ connect();
+ }}
+ style={{ margin: 'auto', whiteSpace: 'nowrap' }}
+ >
+
+ Connect Wallet
+
+ )}
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ margin-top: -20px;
+`;
+
+const BodyContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+ padding: 20px 0px 40px 0px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 60px;
+ padding: 60px 0px 0px 0px;
+ `)}
+`;
+
+const ContainerTop = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 40px;
+`;
+
+const Header = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const LinkIcon = styled(linkSvg)`
+ fill: ${({ theme }) => theme.palette.brand};
+ cursor: pointer;
+`;
+
+const HeaderTitle = styled.h2`
+ display: flex;
+ align-items: center;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+ gap: 15px;
+ margin: 0px;
+ font-size: 28px;
+ line-height: 52px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 36px;
+ line-height: 67px;
+`)}
+`;
+
+const HeaderText = styled.div`
+ font-weight: 700;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 16px;
+ line-height: 19px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 18px;
+ line-height: 22px;
+`)}
+`;
+
+const StatusContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const BoxContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const Box = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ flex-grow: 1;
+ flex-basis: 0;
+ min-height: 136px;
+ gap: 12px;
+ padding: 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ background: linear-gradient(
+ to bottom,
+ #0b0a0a,
+ #1d1a1a
+ ); //it is lighter than the grey from theme.palette
+`;
+
+const Title = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const Sum = styled.div`
+ font-size: 24px;
+ font-weight: 700;
+ line-height: 29px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ContainerBottom = styled.div`
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ gap: 60px;
+`;
+
+const Nav = styled.nav`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-around;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const Item = styled.button`
+ white-space: nowrap;
+ overflow: hidden;
+ flex-grow: 1;
+ flex-basis: 0;
+ cursor: pointer;
+ background: ${(props) =>
+ props.isActive
+ ? ({ theme }) => theme.palette.gradients.greyVertical
+ : 'none'};
+ border: none;
+
+ &:first-child {
+ border-right: none;
+ border-radius: 9px 0 0 0;
+ padding: 15px 0px 15px 0px;
+ }
+
+ &:last-child {
+ border-left: none;
+ border-radius: 0 9px 0 0;
+ padding: 15px 0px 15px 0px;
+ }
+
+ &:not(:first-child):not(:last-child) {
+ border-left: 1px solid ${({ theme }) => theme.palette.brand};
+ border-right: 1px solid ${({ theme }) => theme.palette.brand};
+ padding: 15px 0px 15px 0px;
+ }
+
+ ${breakpoints.phoneAndAbove(`
+ padding: 15px 40px 15px 40px;
+ `)}
+`;
+
+const ItemText = styled.p`
+ margin: 0px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ // text-align: center;
+ font-size: 14px;
+ line-height: 24px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 16px;
+ line-height: 19px;
+`)}
+`;
+
+const OutletContainer = styled.div<{ wallet?: string }>`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: ${({ wallet }) => (wallet === undefined ? '166px' : 'auto')};
+`;
+
+const WalletIcon = styled(wallet)`
+ min-width: 24px;
+ min-height: 24px;
+`;
+
+const TradeButton = styled(Button)`
+ padding: 12px 20px 12px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark};
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4);
+ border-radius: 10px;
+ font-size: 16px;
+ line-height: 19px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+
+ /* Flex settings for centering button content */
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ /* Flex settings for the span inside the button */
+ & > span {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 12px;
+ }
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/TopNav.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/TopNav.tsx
new file mode 100644
index 000000000..35a08eb4f
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/TopNav.tsx
@@ -0,0 +1,82 @@
+import { useEffect, useState } from 'react';
+import { useLocation } from 'react-router-dom';
+import { TopNav } from 'components/Pages/Core/DappPages/SpiceBazaar/components/TopNav';
+import { MobileTopNavSecondary } from 'components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNavSecondary';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+enum EarnLocPaths {
+ Stake = '/dapp/spice/earn/staketemple/stake',
+ Auctions = '/dapp/spice/earn/auctions',
+}
+
+const EarnConfig = [
+ {
+ label: 'Stake TEMPLE',
+ linkTo: EarnLocPaths.Stake,
+ },
+ {
+ label: 'USDS Gold Auctions',
+ linkTo: EarnLocPaths.Auctions,
+ },
+];
+
+export const EarnTopNav = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+ const loc = useLocation();
+ const [menuNavItems, setMenuNavItems] = useState(
+ EarnConfig.map((item) => ({
+ label: item.label,
+ path: item.linkTo,
+ selected: item.linkTo === loc.pathname,
+ }))
+ );
+
+ useEffect(() => {
+ setMenuNavItems((prevMenuNavItems) =>
+ prevMenuNavItems.map((menuItem) => ({
+ ...menuItem,
+ selected:
+ menuItem.path === loc.pathname ||
+ (menuItem.path === '/dapp/spice/earn/staketemple/stake' &&
+ loc.pathname.startsWith('/dapp/spice/earn/staketemple')),
+ }))
+ );
+ }, [loc.pathname]);
+
+ const onSelectMenuNavItems = (selectedMenuItem: { label: string }) => {
+ setMenuNavItems(
+ menuNavItems.map((item) => {
+ if (item.label === selectedMenuItem.label) {
+ return { ...item, selected: true };
+ }
+ return { ...item, selected: false };
+ })
+ );
+ };
+
+ return (
+ <>
+ {isPhoneOrAbove ? (
+
+ ) : (
+
+ )}
+ >
+ );
+};
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Unstake.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Unstake.tsx
new file mode 100644
index 000000000..d4e3dc10c
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/Unstake.tsx
@@ -0,0 +1,7 @@
+export const Unstake = () => {
+ return (
+ <>
+ Unstake
+ >
+ );
+};
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/index.tsx
new file mode 100644
index 000000000..bf7a74850
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/Earn/index.tsx
@@ -0,0 +1,435 @@
+import styled from 'styled-components';
+import { useNavigate } from 'react-router-dom';
+import linkSvg from 'assets/icons/link.svg?react';
+import stakeTemple from 'assets/images/stake-temple.svg';
+import goldAuctions from 'assets/images/gold-auctions.svg';
+import liveGoldAuction from 'assets/icons/live-gold-auction.svg?react';
+import CircleLeft from 'assets/images/earn-circle-left.svg?react';
+import CircleLeftMobile from 'assets/images/earn-circle-left-mobile.svg?react';
+import CircleRight from 'assets/images/earn-circle-right.svg?react';
+import { Button } from 'components/Button/Button';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+export const Earn = () => {
+ const navigate = useNavigate();
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ return (
+
+
+
+ Earn Temple Gold
+
+
+
+ Temple Gold (TGLD) is the native currency of the Spice Bazaar.{' '}
+ {!isPhoneOrAbove &&
}
+ TGLD can be used to enter bids on certain tokens from the Treasury{' '}
+ {!isPhoneOrAbove &&
}
+ offered through periodic Auctions called Spice Auctions.{' '}
+ {!isPhoneOrAbove &&
}
+
+
+ Temple Gold is accessible to everyone. If you do not{' '}
+ {!isPhoneOrAbove &&
}
+ hold TEMPLE, You may directly enter USDS bids for{' '}
+ {!isPhoneOrAbove &&
}
+ TGLD through bi-weekly Gold Auctions. If you are a{' '}
+ {!isPhoneOrAbove &&
}
+ TEMPLE holder, simply stake TEMPLE for TGLD{' '}
+ {!isPhoneOrAbove &&
}
+ rewards every Epoch and use them in Spice Auctions.{' '}
+ {!isPhoneOrAbove &&
}
+
+
+
+
+
+ Stake TEMPLE for TGLD
+ {isPhoneOrAbove ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ Temple Gold (TGLD) rewards will be distributed every Epoch
+ to staked TEMPLE tokens.
+
+
+ The TGLD reward rate for each Epoch depends on the number of
+ staked TEMPLE and the amount of TGLD in circulation.
+
+
+ Earned TGLD rewards can be used to bid in Spice Auctions.
+
+
+ Once staked, there will be a Cooldown before you can unstake
+ TEMPLE. Learn More
+
+
+
+ navigate('staketemple/stake')}
+ style={{ whiteSpace: 'nowrap', margin: 0 }}
+ >
+ Stake Temple for TGLD
+
+
+
+
+
+
+ {isPhoneOrAbove && (
+
+ )}
+
+
+
+ AN AUCTION IS LIVE
+
+ {isPhoneOrAbove ? (
+
+ ) : (
+
+ )}
+
+
+
+ Bid USDS for TGLD {!isPhoneOrAbove &&
}
+ (Gold Auctions)
+
+
+ In a Temple Gold Auction, you may bid{' '}
+ {!isPhoneOrAbove &&
} USDS to earn TGLD which can be
+ used to redeem volatile tokens in the Spice Auction. The more
+ USDS you bid, the more TGLD you will earn when the Temple Gold
+ Auction expires.
+
+
+ There is no minimum reserve price and the Auction unit price
+ for 1 TGLD will not be known until the last Bid has been
+ submitted.{' '}
+
+ Once submitted, USDS bids cannot be withdrawn.
+ {' '}
+ Learn More
+
+
+ navigate('auctions')}
+ >
+ Bid USDS For TGLD
+
+
+ {!isPhoneOrAbove && (
+
+ )}
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ margin-top: -20px;
+ display: flex;
+ flex-direction: column;
+ gap: 80px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 60px;
+ `)}
+`;
+
+const Header = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const HeaderTitle = styled.h2`
+ display: flex;
+ align-items: center;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+ gap: 15px;
+ margin: 0px;
+ font-size: 28px;
+ line-height: 52px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 36px;
+ line-height: 67px;
+ `)}
+`;
+
+const LinkIcon = styled(linkSvg)`
+ fill: ${({ theme }) => theme.palette.brand};
+ cursor: pointer;
+`;
+
+const HeaderText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ font-weight: 700;
+ color: ${({ theme }) => theme.palette.brand};
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 18px;
+ line-height: 22px;
+ `)}
+`;
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 30px;
+`;
+
+const StakeContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ border-radius: 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ gap: 60px;
+ padding: 32px;
+ align-items: center;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const StakeContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+ position: relative;
+`;
+
+const StakeContentImage = styled(CircleLeft)`
+ position: absolute;
+ top: 46px;
+ left: 0;
+ z-index: 0;
+`;
+
+const StakeContentImageMobile = styled(CircleLeftMobile)`
+ position: absolute;
+ top: 60px;
+ left: 0;
+ z-index: 0;
+`;
+
+const StakeContentText = styled.div`
+ z-index: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 40px;
+
+ ${breakpoints.phoneAndAbove(`
+ align-items: flex-start;
+ `)}
+`;
+
+const StakeBody = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const StakeTitle = styled.h3`
+ font-size: 20px;
+ line-height: 37px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+ text-align: center;
+
+ ${breakpoints.phoneAndAbove(`
+ text-align: left;
+ font-size: 24px;
+ line-height: 44px;
+ `)}
+`;
+
+const StakeText = styled.ul`
+ list-style-type: disc;
+ padding-left: 20px;
+ margin: 0px;
+
+ & li::marker {
+ color: ${({ theme }) => theme.palette.brand};
+ }
+`;
+
+const StakeListItem = styled.li`
+ font-size: 16px;
+ line-height: 24px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin-bottom: 8px;
+ &:last-child {
+ margin-bottom: 0;
+ }
+ .learn-more {
+ font-weight: 700;
+ text-decoration: underline;
+ font-size: 13px;
+ line-height: 20px;
+ }
+
+ ${breakpoints.phoneAndAbove(`
+ line-height: 20px;
+ `)}
+`;
+
+const StakeImg = styled.img`
+ width: 275px;
+ height: 245px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 390px;
+ height: 345px;
+ `)}
+`;
+
+const AuctionsContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ border-radius: 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ padding: 32px;
+`;
+
+const AuctionsContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ position: relative;
+ gap: 40px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 20px;
+`)}
+`;
+
+const AuctionContentImage = styled(CircleRight)`
+ position: absolute;
+ top: 40px;
+ right: 0px;
+ z-index: 0;
+`;
+
+const AuctionContentImageMobile = styled(CircleLeftMobile)`
+ position: absolute;
+ top: 60px;
+ left: 0;
+ z-index: 0;
+`;
+
+const AuctionContentText = styled.div`
+ z-index: 1;
+ display: flex;
+ flex-direction: column;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 40px;
+
+ ${breakpoints.phoneAndAbove(`
+ align-items: flex-start;
+ `)}
+`;
+
+const AuctionBody = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const AuctionsStatus = styled.div`
+ display: flex;
+ width: 170px;
+ flex-direction: row;
+ align-self: center;
+ justify-content: space-between;
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+ color: ${({ theme }) => theme.palette.brandLight};
+ padding: 8px;
+ border: 1px solid ${({ theme }) => theme.palette.brandLight};
+ border-radius: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ align-self: flex-end;
+`)}
+`;
+
+const AuctionsImg = styled.img`
+ width: 271px;
+ height: 310px;
+`;
+
+const LiveAuctionIcon = styled(liveGoldAuction)`
+ width: '17px';
+ height: '17px';
+`;
+
+const AuctionsTitle = styled.h3`
+ font-size: 20px;
+ line-height: 37px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+ text-align: center;
+
+ ${breakpoints.phoneAndAbove(`
+ text-align: left;
+ font-size: 24px;
+ line-height: 44px;
+ `)}
+`;
+
+const AuctionsText = styled.div`
+ font-size: 16px;
+ line-height: 24px;
+ color: ${({ theme }) => theme.palette.brand};
+ text-align: center;
+ .submission {
+ font-weight: 700;
+ }
+ .learn-more {
+ font-weight: 700;
+ text-decoration: underline;
+ font-size: 13px;
+ line-height: 20px;
+ }
+
+ ${breakpoints.phoneAndAbove(`
+ line-height: 20px;
+ text-align: left;
+ `)}
+`;
+
+const TradeButton = styled(Button)`
+ padding: 10px 20px 10px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark};
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4);
+ border-radius: 10px;
+ font-weight: 700;
+ font-size: 12px;
+ line-height: 18px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTable/DataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTable/DataTable.tsx
new file mode 100644
index 000000000..e3dbf8b11
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTable/DataTable.tsx
@@ -0,0 +1,249 @@
+import React, { useEffect, useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import styled from 'styled-components';
+import { Transaction } from './Table';
+import { Button } from 'components/Button/Button';
+import checkbox from 'assets/icons/checkbox-square.svg?react';
+import { Popover } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Popover';
+import { BidTgld } from '../BidTgld';
+
+enum TableHeaders {
+ EpochId = 'EPOCH\nID',
+ AuctionEndDateTime = 'Auction End\nDate/Time',
+ BidAmount = 'Bid Amount',
+ ClaimableTokens = 'Claimable\nTOKENS',
+ Unit = 'Unit',
+ UnitPrice = 'Unit Price\n(TGLD)',
+ Claim = 'Claim',
+ Increase = '',
+}
+
+type TableProps = {
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+export const DataTable: React.FC = ({
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const [modal, setModal] = useState<'closed' | 'bidTgld'>('closed');
+
+ const tableHeaders = [
+ { name: TableHeaders.EpochId },
+ { name: TableHeaders.AuctionEndDateTime },
+ { name: TableHeaders.BidAmount },
+ { name: TableHeaders.ClaimableTokens },
+ { name: TableHeaders.Unit },
+ { name: TableHeaders.UnitPrice },
+ { name: TableHeaders.Claim },
+ { name: TableHeaders.Increase },
+ ];
+
+ const [filter, setFilter] = useState('Last 5 Shown');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+
+ const navigate = useNavigate();
+
+ const filterOptions = ['Last 5 Shown', 'Show All'];
+
+ // State to track the selected (checked) checkbox
+ const [selectedClaim, setSelectedClaim] = useState(null);
+
+ // Function to handle checkbox change
+ const handleCheckboxChange = (epochId: number) => {
+ setSelectedClaim(epochId === selectedClaim ? null : epochId); // Toggle between checked and unchecked
+ };
+
+ return (
+ <>
+
+
+ BID for Spice History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+ {tableHeaders.map((h) => (
+
+ {h.name === TableHeaders.Claim ? (
+
+ {h.name}
+
+ ) : (
+ h.name
+ )}
+
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : transactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ transactions.map((transaction) => (
+
+ {transaction.epochId}
+ {transaction.auctionEndDateTime}
+ {transaction.bidAmount} TLGD
+ {transaction.claimableTokens}
+ {transaction.unit}
+ {transaction.unitPrice}
+
+ handleCheckboxChange(transaction.epochId)}
+ />
+
+ {transaction.claim}
+
+ setModal('bidTgld')}
+ style={{ whiteSpace: 'nowrap', margin: 0 }}
+ >
+ Increase Bid
+
+
+
+ ))
+ )}
+
+
+
+ setModal('closed')}
+ closeOnClickOutside
+ showCloseButton
+ >
+
+
+ >
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 20px;
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ font-weight: 400;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px
+ width: 100%;
+ border-collapse: collapse;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th<{ name: string }>`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ color: ${({ theme }) => theme.palette.brand};
+ white-space: ${({ name }) =>
+ name === TableHeaders.EpochId ||
+ name === TableHeaders.AuctionEndDateTime ||
+ name === TableHeaders.ClaimableTokens ||
+ name === TableHeaders.UnitPrice
+ ? 'pre-wrap'
+ : 'nowrap'};
+`;
+
+const DataRow = styled.tr`
+ padding-left: 16px;
+`;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+
+ &:first-child {
+ padding-left: 16px;
+ }
+`;
+
+const TradeButton = styled(Button)`
+ padding: 10px 20px 10px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark}; //if button is not active this is not used
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4); //if button is not active this is not used
+ border-radius: 10px;
+ font-weight: 700;
+ font-size: 12px;
+ line-height: 18px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const CheckBox = styled(checkbox)``;
+
+const ClaimHeader = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 12px;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTable/Table.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTable/Table.tsx
new file mode 100644
index 000000000..3fb5c53fe
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTable/Table.tsx
@@ -0,0 +1,79 @@
+import styled from 'styled-components';
+import { DataTable } from './DataTable';
+
+export type Transaction = {
+ epochId: number;
+ auctionEndDateTime: string;
+ bidAmount: number;
+ claimableTokens: number | '-';
+ unit: 'WSBI' | 'ENA';
+ unitPrice: number | '-';
+ claim: string;
+ increase: string;
+};
+
+const data: Transaction[] = [
+ {
+ epochId: 1,
+ auctionEndDateTime: '30.09.2024',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'WSBI',
+ unitPrice: '-',
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 2,
+ auctionEndDateTime: '14.10.2024',
+ bidAmount: 100,
+ claimableTokens: 100000,
+ unit: 'WSBI',
+ unitPrice: 231,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 3,
+ auctionEndDateTime: '28.10.2024',
+ bidAmount: 100,
+ claimableTokens: 200000,
+ unit: 'ENA',
+ unitPrice: 99,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 4,
+ auctionEndDateTime: '28.10.2024',
+ bidAmount: 100,
+ claimableTokens: 150000,
+ unit: 'WSBI',
+ unitPrice: 78,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 5,
+ auctionEndDateTime: '-',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'ENA',
+ unitPrice: '-',
+ claim: '',
+ increase: '',
+ },
+];
+
+export const BidHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTgld.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTgld.tsx
new file mode 100644
index 000000000..298ef0cf3
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/BidTgld.tsx
@@ -0,0 +1,258 @@
+import styled from 'styled-components';
+import { TradeButton } from '../BidsForTGLD/BidUSDS';
+import templeGold from 'assets/icons/temple-gold.svg?react';
+import { Input } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Input';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+export const BidTgld = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ return (
+
+
+ BID TGLD
+
+
+
+
+
+ 70.53 TGLD
+ AVAILABLE
+
+
+
+
+ Current Bid Amount
+
+
+
+ New Bid Amount
+
+
+
+
+ If the current bid price holds, you will {!isPhoneOrAbove &&
}
+ receive X {isPhoneOrAbove &&
}
+ TOKEN at 5.32 TGLD per TOKEN
+
+
+
+ i
+
+
+
+ Current TGLD price may rise before the end of the auction.
+
+
+ Once submitted, the bid cannot be withdrawn or cancelled.
+
+
+
+ console.log('clicked')}
+ >
+ SUBMIT NEW BID
+
+
+
+ );
+};
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ flex-grow: 1;
+ gap: 32px;
+ max-width: 393px;
+ padding: 0px 16px 0px 16px;
+
+ ${breakpoints.phoneAndAbove(`
+ max-width: 100%;
+ padding: 0px 0px 0px 0px;
+ `)}
+`;
+
+const TitleContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ height: 77px;
+ width: 100%;
+ justify-content: center;
+ align-items: center;
+ background: ${({ theme }) => theme.palette.gradients.grey};
+
+ ${breakpoints.phoneAndAbove(`
+ width: 624px;
+ `)}
+`;
+
+const Title = styled.h3`
+ diplay: flex;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 28px;
+ line-height: 52px;
+ text-align: center;
+ margin: 0px;
+`;
+
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 450px;
+ flex-grow: 1;
+ padding: 8px 0px 8px 0px;
+ gap: 24px;
+ width: 360px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const AvailableAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const TempleGoldIcon = styled(templeGold)`
+ width: 42px;
+ height: 42px;
+`;
+
+const AvailableAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const AvailableAmount = styled.h3`
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.gold};
+ margin: 0px;
+`;
+
+const AvailableText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const BidContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ border-top: 2px solid ${({ theme }) => theme.palette.brand};
+ border-bottom: 2px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 32px;
+`;
+
+const BidContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const TitleBid = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmountContainer = styled.p`
+ display: flex;
+ align-items: center;
+ width: 100%;
+ padding: 0px 24px 0px 24px;
+ font-size: 16px;
+ line-height: 19px;
+ margin: 0px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const InfoCircle = styled.div`
+ display: flex;
+ margin: 0.25rem;
+ padding: 0.5rem;
+ align-items: center;
+ justify-content: center;
+ width: 1.25rem;
+ height: 1.25rem;
+ font-size: 1rem;
+ font-weight: 600;
+ border-radius: 50%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const MessageText = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const Text = styled.p`
+ margin: 0px;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
+
+const WarningMessage = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ border: 2px solid transparent;
+ border-image-source: linear-gradient(
+ 180deg,
+ rgba(149, 97, 63, 0.1) 0%,
+ rgba(255, 255, 255, 0) 100%
+ );
+ border-image-slice: 1;
+ border-radius: 6px;
+ padding: 10px 0px 10px 10px;
+ gap: 10px;
+ background: #24272c;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/Tables/BidTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/Tables/BidTable.tsx
new file mode 100644
index 000000000..81204d647
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/Tables/BidTable.tsx
@@ -0,0 +1,97 @@
+import styled from 'styled-components';
+import { DataTable } from '../../DataTables/BidDataTable';
+import type { Transaction } from '../../DataTables/BidDataTable';
+
+enum TableHeaders {
+ EpochId = 'EPOCH\nID',
+ AuctionEndDateTime = 'Auction End\nDate/Time',
+ BidAmount = 'Bid Amount',
+ ClaimableTokens = 'Claimable\nTOKENS',
+ Unit = 'Unit',
+ UnitPrice = 'Unit Price\n(TGLD)',
+ Claim = 'Claim',
+ Increase = '',
+}
+
+const data: Transaction[] = [
+ {
+ epochId: 1,
+ auctionEndDateTime: '30.09.2024',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'WSBI',
+ unitPrice: '-',
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 2,
+ auctionEndDateTime: '14.10.2024',
+ bidAmount: 100,
+ claimableTokens: 100000,
+ unit: 'WSBI',
+ unitPrice: 231,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 3,
+ auctionEndDateTime: '28.10.2024',
+ bidAmount: 100,
+ claimableTokens: 200000,
+ unit: 'ENA',
+ unitPrice: 99,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 4,
+ auctionEndDateTime: '28.10.2024',
+ bidAmount: 100,
+ claimableTokens: 150000,
+ unit: 'WSBI',
+ unitPrice: 78,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 5,
+ auctionEndDateTime: '-',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'ENA',
+ unitPrice: '-',
+ claim: '',
+ increase: '',
+ },
+];
+
+const tableHeaders = [
+ { name: TableHeaders.EpochId },
+ { name: TableHeaders.AuctionEndDateTime },
+ { name: TableHeaders.BidAmount },
+ { name: TableHeaders.ClaimableTokens },
+ { name: TableHeaders.Unit },
+ { name: TableHeaders.UnitPrice },
+ { name: TableHeaders.Claim },
+ { name: TableHeaders.Increase },
+];
+
+export const BidHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/Tables/TransactionsTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/Tables/TransactionsTable.tsx
new file mode 100644
index 000000000..835828199
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/Tables/TransactionsTable.tsx
@@ -0,0 +1,70 @@
+import styled from 'styled-components';
+import { DataTable } from '../../DataTables/TransactionsDataTable';
+import type { Transaction } from '../../DataTables/TransactionsDataTable';
+
+enum TableHeaders {
+ Epoch = 'EPOCH',
+ Type = 'Type',
+ TransactionLink = 'Transaction Link',
+}
+
+const data: Transaction[] = [
+ {
+ epoch: '12/11/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/11/2024',
+ type: 'Claim',
+ transactionLink: '0x342c4535430979a...0b6b8b25',
+ },
+ {
+ epoch: '12/11/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/11/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/11/2024',
+ type: 'Claim',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/11/2024',
+ type: 'Claim',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/11/2024',
+ type: 'Claim',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+];
+
+const tableHeaders = [
+ { name: TableHeaders.Epoch },
+ { name: TableHeaders.Type },
+ { name: TableHeaders.TransactionLink },
+];
+
+export const TransactionsHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/TransactionsTable/DataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/TransactionsTable/DataTable.tsx
new file mode 100644
index 000000000..41bf3c076
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/TransactionsTable/DataTable.tsx
@@ -0,0 +1,150 @@
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import { Transaction } from './Table';
+
+enum TableHeaders {
+ Epoch = 'EPOCH',
+ Type = 'Type',
+ TransactionLink = 'Transaction Link',
+}
+
+type TableProps = {
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+export const DataTable: React.FC = ({
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const tableHeaders = [
+ { name: TableHeaders.Epoch },
+ { name: TableHeaders.Type },
+ { name: TableHeaders.TransactionLink },
+ ];
+
+ const [filter, setFilter] = useState('Last 5 Shown');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+
+ const filterOptions = ['Last 5 Shown', 'Show All'];
+
+ return (
+
+
+ Transaction History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+ {tableHeaders.map((h) => (
+ {h.name}
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : transactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ transactions.map((transaction) => (
+
+ {transaction.epoch}
+ {transaction.type}
+ {transaction.transactionLink}
+
+ ))
+ )}
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 32px;
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ font-weight: 400;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px
+ width: 100%;
+ border-collapse: collapse;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ width: 33.33%;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const DataRow = styled.tr``;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ width: 33.33%;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/TransactionsTable/Table.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/TransactionsTable/Table.tsx
new file mode 100644
index 000000000..e2362fd26
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/TransactionsTable/Table.tsx
@@ -0,0 +1,49 @@
+import styled from 'styled-components';
+import { DataTable } from './DataTable';
+
+export type Transaction = {
+ epoch: string;
+ type: 'Bid' | 'Claim';
+ transactionLink: string;
+};
+
+const data: Transaction[] = [
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Claim',
+ transactionLink: '0x342c4535430979a...0b6b8b25',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Claim',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+];
+
+export const TransactionsHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/index.tsx
new file mode 100644
index 000000000..6c7701dc4
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice/index.tsx
@@ -0,0 +1,190 @@
+import styled from 'styled-components';
+import { MyActivityTopNav } from '../TopNav';
+import linkSvg from 'assets/icons/link.svg?react';
+import { BidHistory } from './Tables/BidTable';
+import { TransactionsHistory } from './Tables/TransactionsTable';
+import { Button } from 'components/Button/Button';
+import * as breakpoints from 'styles/breakpoints';
+
+export const MyActivitySpice = () => {
+ return (
+
+
+
+ Bids for Spice
+
+
+
+
+
+ 0
+ Total Redeemed TGLD
+
+
+
+ $17,851
+ Unclaimed Rewards (USD)
+
+ console.log('clicked')}
+ >
+ Claim selected
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ margin-top: -20px;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 40px;
+ `)}
+`;
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 60px;
+`;
+
+const Title = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 15px;
+`;
+
+const TitleText = styled.h2`
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+ font-size: 28px;
+ line-height: 52px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 36px;
+ line-height: 67px;
+ `)}
+`;
+
+const LinkIcon = styled(linkSvg)`
+ fill: ${({ theme }) => theme.palette.brand};
+ cursor: pointer;
+`;
+
+const StatusContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ gap: 12px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ gap: 20px;
+ `)}
+`;
+
+const BalanceBox = styled.div`
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ flex-basis: 0;
+ justify-content: center;
+ align-items: center;
+ min-height: 140px;
+ padding: 20px 10px 20px 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ gap: 12px;
+ background: linear-gradient(180deg, #0b0a0a 0%, #1d1a1a 100%);
+
+ ${breakpoints.phoneAndAbove(`
+ padding: 10px 20px 20px 20px;
+ background: none;
+ height: 180px;
+ gap: 20px;
+ `)}
+`;
+
+const UnclaimedBox = styled.div`
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ flex-basis: 0;
+ justify-content: center;
+ align-items: center;
+ min-height: 190px;
+ padding: 20px 10px 20px 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ gap: 20px;
+ background: linear-gradient(180deg, #0b0a0a 0%, #1d1a1a 100%);
+
+ ${breakpoints.phoneAndAbove(`
+ padding: 10px 20px 0px 20px;
+ background: none;
+ min-height: 180px;
+ `)}
+`;
+
+const StatusValue = styled.div`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ font-weight: 700;
+ line-height: 29px;
+`;
+
+const StatusText = styled.div`
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 16px;
+ line-height: 19px;
+ text-align: center;
+`;
+
+const Status = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 15px;
+`;
+
+const TablesContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 0px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 80px;
+ `)}
+`;
+
+const TradeButton = styled(Button)`
+ padding: 10px 20px 10px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark}; //if button is not active this is not used
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4); //if button is not active this is not used
+ border-radius: 10px;
+ font-weight: 700;
+ font-size: 12px;
+ line-height: 18px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidDai.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidDai.tsx
new file mode 100644
index 000000000..669a52650
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidDai.tsx
@@ -0,0 +1,291 @@
+import styled from 'styled-components';
+import { Button } from 'components/Button/Button';
+import dai from 'assets/icons/Dai.svg?react';
+import templeGold from 'assets/icons/temple-gold.svg?react';
+import { Input } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Input';
+
+export const BidDai = () => {
+ return (
+
+
+ BID DAI
+
+
+
+
+
+ 70.53 DAI
+ AVAILABLE
+
+
+
+
+ Current Bid Amount
+
+
+
+ New Bid Amount
+
+
+
+
+ You will receive
+
+
+ 1 TGLD
+
+
+ at the current TGLD priece of 5.32 DAI per TGLD
+
+
+
+
+ i
+
+
+
+ Current TGLD price may rise before the end of the auction.
+
+
+ Once submitted, the bid cannot be withdrawn or cancelled.
+
+
+
+ console.log('clicked')}
+ >
+ SUBMIT NEW BID
+
+
+
+ );
+};
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ flex-grow: 1;
+ gap: 32px;
+`;
+
+const TitleContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ height: 77px;
+ width: 624px;
+ justify-content: center;
+ align-items: center;
+ background: ${({ theme }) => theme.palette.gradients.grey};
+`;
+
+const Title = styled.h3`
+ diplay: flex;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 28px;
+ font-weight: 400;
+ line-height: 52px;
+ text-align: center;
+ margin: 0px;
+`;
+
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 450px;
+ align-items: center;
+ flex-grow: 1;
+ padding: 8px 0px 8px 0px;
+ gap: 24px;
+`;
+
+const AvailableAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ width: 450px;
+ gap: 10px;
+`;
+
+const DaiIcon = styled(dai)`
+ width: 42px;
+ height: 42px;
+`;
+
+const AvailableAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const AvailableAmount = styled.h3`
+ font-weight: 400;
+ font-size: 28px;
+ line-height: 52px;
+ font-weight: 400;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const AvailableText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const BidContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ border-top: 2px solid ${({ theme }) => theme.palette.brand};
+ border-bottom: 2px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 32px;
+`;
+
+const BidContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const TitleBid = styled.div`
+ font-weight: 400;
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmountContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 100%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ background: ${({ theme }) => theme.palette.black};
+ gap: 20px;
+ padding: 16px;
+`;
+
+const TempleGoldIcon = styled(templeGold)``;
+
+const ReceiveContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 20px;
+`;
+
+const ReceiveTextTop = styled.div`
+ font-weight: 400;
+ letter-spacing: -0.02em;
+ font-size: 18px;
+ line-height: 21px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveTextBottom = styled.div`
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 19px;
+ letter-spacing: 0.05em;
+ span {
+ font-weight: 700;
+ }
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmount = styled.h3`
+ line-height: 52px;
+ font-size: 28px;
+ line-height: 52px;
+ font-weight: 400;
+ color: ${({ theme }) => theme.palette.gold};
+ margin: 0px;
+`;
+
+const InfoCircle = styled.div`
+ display: flex;
+ margin: 0.25rem;
+ padding: 0.5rem;
+ align-items: center;
+ justify-content: center;
+ width: 1.25rem;
+ height: 1.25rem;
+ font-size: 1rem;
+ font-weight: 600;
+ border-radius: 50%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const MessageText = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const Text = styled.p`
+ margin: 0px;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
+
+const WarningMessage = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ border: 2px solid transparent;
+ border-image-source: linear-gradient(
+ 180deg,
+ rgba(149, 97, 63, 0.1) 0%,
+ rgba(255, 255, 255, 0) 100%
+ );
+ border-image-slice: 1;
+ border-radius: 6px;
+ padding: 10px 0px 10px 10px;
+ gap: 10px;
+ background: #24272c;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
+
+export const TradeButton = styled(Button)`
+ padding: 12px 20px 12px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark}; //if button is not active this is not used
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4); //if button is not active this is not used
+ border-radius: 10px;
+ font-size: 16px;
+ line-height: 19px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidTable/DataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidTable/DataTable.tsx
new file mode 100644
index 000000000..b441b8ae6
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidTable/DataTable.tsx
@@ -0,0 +1,246 @@
+import React, { useEffect, useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import styled from 'styled-components';
+import { Transaction } from './Table';
+import { Button } from 'components/Button/Button';
+import checkbox from 'assets/icons/checkbox-square.svg?react';
+import { Popover } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Popover';
+import { BidDai } from '../BidDai';
+
+enum TableHeaders {
+ EpochId = 'EPOCH\nID',
+ AuctionEndDateTime = 'Auction End\nDate/Time',
+ BidAmount = 'Bid Amount',
+ ClaimableTokens = 'Claimable TOKENS',
+ Unit = 'Unit',
+ UnitPrice = 'Unit Price (DAI)',
+ Claim = 'Claim',
+ Increase = '',
+}
+
+type TableProps = {
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+export const DataTable: React.FC = ({
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const [modal, setModal] = useState<'closed' | 'bidDai'>('closed');
+
+ const tableHeaders = [
+ { name: TableHeaders.EpochId },
+ { name: TableHeaders.AuctionEndDateTime },
+ { name: TableHeaders.BidAmount },
+ { name: TableHeaders.ClaimableTokens },
+ { name: TableHeaders.Unit },
+ { name: TableHeaders.UnitPrice },
+ { name: TableHeaders.Claim },
+ { name: TableHeaders.Increase },
+ ];
+
+ const [filter, setFilter] = useState('Last 5 Shown');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+
+ const navigate = useNavigate();
+
+ const filterOptions = ['Last 5 Shown', 'Show All'];
+
+ // State to track the selected (checked) checkbox
+ const [selectedClaim, setSelectedClaim] = useState(null);
+
+ // Function to handle checkbox change
+ const handleCheckboxChange = (epochId: number) => {
+ setSelectedClaim(epochId === selectedClaim ? null : epochId); // Toggle between checked and unchecked
+ };
+
+ return (
+ <>
+
+
+ BID for TGLD History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+ {tableHeaders.map((h) => (
+
+ {h.name === TableHeaders.Claim ? (
+
+ {h.name}
+
+ ) : (
+ h.name
+ )}
+
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : transactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ transactions.map((transaction) => (
+
+ {transaction.epochId}
+ {transaction.auctionEndDateTime}
+ {transaction.bidAmount} DAO
+ {transaction.claimableTokens}
+ {transaction.unit}
+ {transaction.unitPrice}
+
+ handleCheckboxChange(transaction.epochId)}
+ />
+
+ {transaction.claim}
+
+ setModal('bidDai')}
+ style={{ whiteSpace: 'nowrap', margin: 0 }}
+ >
+ Increase Bid
+
+
+
+ ))
+ )}
+
+
+
+ setModal('closed')}
+ closeOnClickOutside
+ showCloseButton
+ >
+
+
+ >
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 20px;
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ font-weight: 400;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px
+ width: 100%;
+ border-collapse: collapse;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th<{ name: string }>`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ color: ${({ theme }) => theme.palette.brand};
+ white-space: ${({ name }) =>
+ name === TableHeaders.EpochId || name === TableHeaders.AuctionEndDateTime
+ ? 'pre-wrap'
+ : 'nowrap'};
+`;
+
+const DataRow = styled.tr`
+ padding-left: 16px;
+`;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+
+ &:first-child {
+ padding-left: 16px;
+ }
+`;
+
+const TradeButton = styled(Button)`
+ padding: 10px 20px 10px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark}; //if button is not active this is not used
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4); //if button is not active this is not used
+ border-radius: 10px;
+ font-weight: 700;
+ font-size: 12px;
+ line-height: 18px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const CheckBox = styled(checkbox)``;
+
+const ClaimHeader = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 12px;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidTable/Table.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidTable/Table.tsx
new file mode 100644
index 000000000..c6f9793c6
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidTable/Table.tsx
@@ -0,0 +1,79 @@
+import styled from 'styled-components';
+import { DataTable } from './DataTable';
+
+export type Transaction = {
+ epochId: number;
+ auctionEndDateTime: string;
+ bidAmount: number;
+ claimableTokens: number | '-';
+ unit: 'TGLD';
+ unitPrice: number;
+ claim: string;
+ increase: string;
+};
+
+const data: Transaction[] = [
+ {
+ epochId: 1,
+ auctionEndDateTime: '30.09.2024',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'TGLD',
+ unitPrice: 0.0025,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 2,
+ auctionEndDateTime: '14.10.2024',
+ bidAmount: 100,
+ claimableTokens: 100000,
+ unit: 'TGLD',
+ unitPrice: 0.0029,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 3,
+ auctionEndDateTime: '28.10.2024',
+ bidAmount: 100,
+ claimableTokens: 200000,
+ unit: 'TGLD',
+ unitPrice: 0.0025,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 4,
+ auctionEndDateTime: '28.10.2024',
+ bidAmount: 100,
+ claimableTokens: 150000,
+ unit: 'TGLD',
+ unitPrice: 0.0045,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 5,
+ auctionEndDateTime: '-',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'TGLD',
+ unitPrice: 0.0029,
+ claim: '',
+ increase: '',
+ },
+];
+
+export const BidHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidUSDS.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidUSDS.tsx
new file mode 100644
index 000000000..4394a4dd5
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/BidUSDS.tsx
@@ -0,0 +1,310 @@
+import styled from 'styled-components';
+import { Button } from 'components/Button/Button';
+import usds from 'assets/icons/usds.svg?react';
+import templeGold from 'assets/icons/temple-gold.svg?react';
+import { Input } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Input';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+export const BidUSDS = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+
+ return (
+
+
+ BID USDS
+
+
+
+
+
+ 70.53 USDS
+ AVAILABLE
+
+
+
+
+ Current Bid Amount
+
+
+
+ New Bid Amount
+
+
+
+
+ You will receive
+
+
+ 1 TGLD
+
+
+ at the current TGLD priece of {!isPhoneOrAbove &&
}
+ 5.32 USDS per TGLD
+
+
+
+
+ i
+
+
+
+ Current TGLD price may rise before the end of the auction.
+
+
+ Once submitted, the bid cannot be withdrawn or cancelled.
+
+
+
+ console.log('clicked')}
+ >
+ SUBMIT NEW BID
+
+
+
+ );
+};
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ flex-grow: 1;
+ gap: 32px;
+ max-width: 393px;
+ padding: 0px 16px 0px 16px;
+
+ ${breakpoints.phoneAndAbove(`
+ max-width: 100%;
+ padding: 0px 0px 0px 0px;
+ `)}
+`;
+
+const TitleContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ height: 77px;
+ width: 100%;
+ justify-content: center;
+ align-items: center;
+ background: ${({ theme }) => theme.palette.gradients.grey};
+
+ ${breakpoints.phoneAndAbove(`
+ width: 624px;
+ `)}
+`;
+
+const Title = styled.h3`
+ diplay: flex;
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ text-align: center;
+ margin: 0px;
+`;
+
+const Container = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 450px;
+ flex-grow: 1;
+ padding: 8px 0px 8px 0px;
+ gap: 24px;
+ width: 360px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const AvailableAmountContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0px 24px 0px 24px;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 450px;
+ `)}
+`;
+
+const USDSIcon = styled(usds)`
+ width: 42px;
+ height: 42px;
+`;
+
+const AvailableAmountText = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
+
+const AvailableAmount = styled.h3`
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+`;
+
+const AvailableText = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brand};
+ margin: 0px;
+`;
+
+const BidContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ border-top: 2px solid ${({ theme }) => theme.palette.brand};
+ border-bottom: 2px solid ${({ theme }) => theme.palette.brand};
+ background: ${({ theme }) => theme.palette.gradients.grey};
+ padding: 24px;
+ gap: 32px;
+`;
+
+const BidContent = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const TitleBid = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmountContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 100%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ background: ${({ theme }) => theme.palette.black};
+ gap: 20px;
+ padding: 16px;
+`;
+
+const TempleGoldIcon = styled(templeGold)``;
+
+const ReceiveContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 20px;
+`;
+
+const ReceiveTextTop = styled.div`
+ font-size: 18px;
+ line-height: 21px;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveTextBottom = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
+
+const ReceiveAmount = styled.h3`
+ line-height: 52px;
+ font-size: 28px;
+ line-height: 52px;
+ color: ${({ theme }) => theme.palette.gold};
+ margin: 0px;
+`;
+
+const InfoCircle = styled.div`
+ display: flex;
+ margin: 0.25rem;
+ padding: 0.5rem;
+ align-items: center;
+ justify-content: center;
+ width: 1.25rem;
+ height: 1.25rem;
+ font-size: 1rem;
+ font-weight: 600;
+ border-radius: 50%;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const MessageText = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+`;
+
+const Text = styled.p`
+ margin: 0px;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
+
+const WarningMessage = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ border: 2px solid transparent;
+ border-image-source: linear-gradient(
+ 180deg,
+ rgba(149, 97, 63, 0.1) 0%,
+ rgba(255, 255, 255, 0) 100%
+ );
+ border-image-slice: 1;
+ border-radius: 6px;
+ padding: 10px 0px 10px 10px;
+ gap: 10px;
+ background: #24272c;
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+`;
+
+export const TradeButton = styled(Button)`
+ padding: 12px 20px 12px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark}; //if button is not active this is not used
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4); //if button is not active this is not used
+ border-radius: 10px;
+ font-size: 16px;
+ line-height: 19px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/Tables/BidTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/Tables/BidTable.tsx
new file mode 100644
index 000000000..0a658e843
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/Tables/BidTable.tsx
@@ -0,0 +1,117 @@
+import styled from 'styled-components';
+import { DataTable } from '../../DataTables/BidDataTable';
+import type { Transaction } from '../../DataTables/BidDataTable';
+
+enum TableHeaders {
+ EpochId = 'EPOCH\nID',
+ AuctionEndDateTime = 'Auction End\nDate/Time',
+ BidAmount = 'Bid Amount',
+ ClaimableTokens = 'Claimable\nTOKENS',
+ Unit = 'Unit',
+ UnitPrice = 'Unit Price\n(TGLD)',
+ Claim = 'Claim',
+ Increase = '',
+}
+
+const data: Transaction[] = [
+ {
+ epochId: 1,
+ auctionEndDateTime: '30.09.2024',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'TGLD',
+ unitPrice: 0.0025,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 2,
+ auctionEndDateTime: '14.10.2024',
+ bidAmount: 100,
+ claimableTokens: 100000,
+ unit: 'TGLD',
+ unitPrice: 0.0029,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 3,
+ auctionEndDateTime: '28.10.2024',
+ bidAmount: 100,
+ claimableTokens: 200000,
+ unit: 'TGLD',
+ unitPrice: 0.0025,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 4,
+ auctionEndDateTime: '28.10.2024',
+ bidAmount: 100,
+ claimableTokens: 150000,
+ unit: 'TGLD',
+ unitPrice: 0.0045,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 5,
+ auctionEndDateTime: '-',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'TGLD',
+ unitPrice: 0.0029,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 6,
+ auctionEndDateTime: '-',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'TGLD',
+ unitPrice: 0.0029,
+ claim: '',
+ increase: '',
+ },
+ {
+ epochId: 7,
+ auctionEndDateTime: '-',
+ bidAmount: 100,
+ claimableTokens: '-',
+ unit: 'TGLD',
+ unitPrice: 0.0029,
+ claim: '',
+ increase: '',
+ },
+];
+
+const tableHeaders = [
+ { name: TableHeaders.EpochId },
+ { name: TableHeaders.AuctionEndDateTime },
+ { name: TableHeaders.BidAmount },
+ { name: TableHeaders.ClaimableTokens },
+ { name: TableHeaders.Unit },
+ { name: TableHeaders.UnitPrice },
+ { name: TableHeaders.Claim },
+ { name: TableHeaders.Increase },
+];
+
+export const BidHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/Tables/TransactionsTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/Tables/TransactionsTable.tsx
new file mode 100644
index 000000000..f68c1e589
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/Tables/TransactionsTable.tsx
@@ -0,0 +1,70 @@
+import styled from 'styled-components';
+import { DataTable } from '../../DataTables/TransactionsDataTable';
+import type { Transaction } from '../../DataTables/TransactionsDataTable';
+
+enum TableHeaders {
+ Epoch = 'EPOCH',
+ Type = 'Type',
+ TransactionLink = 'Transaction Link',
+}
+
+const data: Transaction[] = [
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Claim',
+ transactionLink: '0x342c4535430979a...0b6b8b25',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Claim',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Claim',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Claim',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+];
+
+const tableHeaders = [
+ { name: TableHeaders.Epoch },
+ { name: TableHeaders.Type },
+ { name: TableHeaders.TransactionLink },
+];
+
+export const TransactionsHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/TransactionsTable/DataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/TransactionsTable/DataTable.tsx
new file mode 100644
index 000000000..41bf3c076
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/TransactionsTable/DataTable.tsx
@@ -0,0 +1,150 @@
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import { Transaction } from './Table';
+
+enum TableHeaders {
+ Epoch = 'EPOCH',
+ Type = 'Type',
+ TransactionLink = 'Transaction Link',
+}
+
+type TableProps = {
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+export const DataTable: React.FC = ({
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const tableHeaders = [
+ { name: TableHeaders.Epoch },
+ { name: TableHeaders.Type },
+ { name: TableHeaders.TransactionLink },
+ ];
+
+ const [filter, setFilter] = useState('Last 5 Shown');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+
+ const filterOptions = ['Last 5 Shown', 'Show All'];
+
+ return (
+
+
+ Transaction History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+ {tableHeaders.map((h) => (
+ {h.name}
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : transactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ transactions.map((transaction) => (
+
+ {transaction.epoch}
+ {transaction.type}
+ {transaction.transactionLink}
+
+ ))
+ )}
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 32px;
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ font-weight: 400;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px
+ width: 100%;
+ border-collapse: collapse;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ width: 33.33%;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const DataRow = styled.tr``;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ width: 33.33%;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/TransactionsTable/Table.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/TransactionsTable/Table.tsx
new file mode 100644
index 000000000..e2362fd26
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/TransactionsTable/Table.tsx
@@ -0,0 +1,49 @@
+import styled from 'styled-components';
+import { DataTable } from './DataTable';
+
+export type Transaction = {
+ epoch: string;
+ type: 'Bid' | 'Claim';
+ transactionLink: string;
+};
+
+const data: Transaction[] = [
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Claim',
+ transactionLink: '0x342c4535430979a...0b6b8b25',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Bid',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+ {
+ epoch: '12/12/2024',
+ type: 'Claim',
+ transactionLink: '0x192c453a2dbb0b...0e74a056',
+ },
+];
+
+export const TransactionsHistory = () => {
+ return (
+
+
+
+ );
+};
+
+const AuctionsHistoryContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/index.tsx
new file mode 100644
index 000000000..a60479861
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD/index.tsx
@@ -0,0 +1,228 @@
+import styled from 'styled-components';
+import { MyActivityTopNav } from '../TopNav';
+import linkSvg from 'assets/icons/link.svg?react';
+import { BidHistory } from './Tables/BidTable';
+import { TransactionsHistory } from './Tables/TransactionsTable';
+import { Button } from 'components/Button/Button';
+import * as breakpoints from 'styles/breakpoints';
+import { useWallet } from 'providers/WalletProvider';
+import { formatUnits } from 'ethers/lib/utils';
+import Loader from 'components/Loader/Loader';
+import { formatNumberWithCommas, formatToken } from 'utils/formatter';
+import { useSpiceBazaar } from 'providers/SpiceBazaarProvider';
+import env from 'constants/env';
+import { TICKER_SYMBOL } from 'enums/ticker-symbol';
+import { useEffect } from 'react';
+
+export const MyActivityTGLD = () => {
+ const { balance, updateBalance } = useWallet();
+ const {
+ stakePageMetrics,
+ staking: { claimRewards },
+ } = useSpiceBazaar();
+ const { data: stakePageMetricsData, loading: stakePageMetricsLoading } =
+ stakePageMetrics;
+
+ // TODO: Move to provider?
+ const hasRewards = stakePageMetricsData.yourRewards > 0;
+
+ useEffect(() => {
+ const onMount = async () => {
+ await updateBalance();
+ };
+ onMount();
+ }, [updateBalance]);
+
+ return (
+
+
+
+ Bids for TGLD
+
+
+
+
+
+
+ {balance.TGLD
+ ? formatToken(balance.TGLD, TICKER_SYMBOL.TEMPLE_GOLD_TOKEN)
+ : '0'}
+
+ Wallet Balance (TGLD)
+
+
+
+ {stakePageMetricsLoading ? (
+
+ ) : (
+ <>
+
+ {formatNumberWithCommas(stakePageMetricsData.yourRewards)}
+ TGLD
+
+ Unclaimed TGLD
+ >
+ )}
+
+
+ Claim selected
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ margin-top: -20px;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 40px;
+ `)}
+`;
+
+const ContentContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 60px;
+`;
+
+const Title = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 15px;
+`;
+
+const TitleText = styled.h2`
+ color: ${({ theme }) => theme.palette.brandLight};
+ margin: 0px;
+ font-size: 28px;
+ line-height: 52px;
+
+ ${breakpoints.phoneAndAbove(`
+ font-size: 36px;
+ line-height: 67px;
+ `)}
+`;
+
+const LinkIcon = styled(linkSvg)`
+ fill: ${({ theme }) => theme.palette.brand};
+ cursor: pointer;
+`;
+
+const StatusContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ gap: 12px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ gap: 20px;
+ `)}
+`;
+
+const BalanceBox = styled.div`
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ flex-basis: 0;
+ justify-content: center;
+ align-items: center;
+ min-height: 140px;
+ padding: 20px 10px 20px 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ gap: 12px;
+ background: linear-gradient(180deg, #0b0a0a 0%, #1d1a1a 100%);
+
+ ${breakpoints.phoneAndAbove(`
+ padding: 10px 20px 20px 20px;
+ background: none;
+ height: 180px;
+ gap: 20px;
+ `)}
+`;
+
+const UnclaimedBox = styled.div`
+ display: flex;
+ flex-direction: column;
+ flex-grow: 1;
+ flex-basis: 0;
+ justify-content: center;
+ align-items: center;
+ min-height: 190px;
+ padding: 20px 10px 20px 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ border-radius: 10px;
+ gap: 20px;
+ background: linear-gradient(180deg, #0b0a0a 0%, #1d1a1a 100%);
+
+ ${breakpoints.phoneAndAbove(`
+ padding: 10px 20px 0px 20px;
+ background: none;
+ min-height: 180px;
+ `)}
+`;
+
+const StatusValue = styled.div`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ font-weight: 700;
+ line-height: 29px;
+`;
+
+const StatusText = styled.div`
+ color: ${({ theme }) => theme.palette.brand};
+ font-size: 16px;
+ line-height: 19px;
+`;
+
+const Status = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 15px;
+`;
+
+const TablesContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 0px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 80px;
+ `)}
+`;
+const TradeButton = styled(Button)`
+ padding: 10px 20px 10px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark}; //if button is not active this is not used
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4); //if button is not active this is not used
+ border-radius: 10px;
+ font-weight: 700;
+ font-size: 12px;
+ line-height: 18px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/DataTables/BidDataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/DataTables/BidDataTable.tsx
new file mode 100644
index 000000000..c9cf771fb
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/DataTables/BidDataTable.tsx
@@ -0,0 +1,295 @@
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import { Button } from 'components/Button/Button';
+import checkbox from 'assets/icons/box.svg?react';
+import { Popover } from 'components/Pages/Core/DappPages/SpiceBazaar/components/Popover';
+import { BidUSDS } from '../BidsForTGLD/BidUSDS';
+import { BidTgld } from '../BidsForSpice/BidTgld';
+import Checkbox from 'components/Pages/Core/DappPages/SpiceBazaar/components/CheckBox';
+import * as breakpoints from 'styles/breakpoints';
+
+export type Transaction = {
+ epochId: number;
+ auctionEndDateTime: string;
+ bidAmount: number;
+ claimableTokens: number | '-';
+ unit: 'TGLD' | 'WSBI' | 'ENA';
+ unitPrice: number | '-';
+ claim: string;
+ increase: string;
+};
+
+type TableHeader = { name: string };
+
+type TableProps = {
+ tableHeaders: TableHeader[];
+ transactions: Transaction[];
+ modal: 'bidDai' | 'bidTgld';
+ loading: boolean;
+ title: string;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+export const DataTable: React.FC = ({
+ modal,
+ tableHeaders,
+ transactions,
+ loading,
+ title,
+ refetch,
+ dataRefetching,
+}) => {
+ const [modalState, setModalState] = useState<'closed' | 'bidDai' | 'bidTgld'>(
+ 'closed'
+ );
+
+ const [filter, setFilter] = useState('Last 5 Shown');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+ const filterOptions = ['Last 5 Shown', 'Show All'];
+
+ useEffect(() => {
+ if (filter === 'Last 5 Shown') {
+ setFilteredTransactions(transactions.slice(0, 5));
+ // setFilteredTransactions(transactions.slice(-5)); - that's if the last transactions are in end of the array
+ } else {
+ setFilteredTransactions(transactions);
+ }
+ }, [filter, transactions]);
+
+ const [isCheckboxChecked, setIsCheckboxChecked] = useState(false);
+ const handleCheckboxToggle = (checked: boolean) => {
+ setIsCheckboxChecked(checked);
+ };
+
+ return (
+ <>
+
+
+ {title}
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+
+ {tableHeaders.map((h) => (
+
+ {h.name === 'Claim' ? (
+
+ {h.name}
+
+ ) : (
+ h.name
+ )}
+
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : filteredTransactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ filteredTransactions.map((transaction) => (
+
+ {transaction.epochId}
+ {transaction.auctionEndDateTime}
+ {transaction.bidAmount} DAO
+ {transaction.claimableTokens}
+ {transaction.unit}
+ {transaction.unitPrice}
+
+
+
+ {transaction.claim}
+
+
+ setModalState(modal)}
+ style={{ whiteSpace: 'nowrap', margin: 0 }}
+ >
+ Increase Bid
+
+
+
+
+ ))
+ )}
+
+
+
+
+ setModalState('closed')}
+ closeOnClickOutside
+ showCloseButton
+ >
+ {modal === 'bidDai' && }
+ {modal === 'bidTgld' && }
+
+ >
+ );
+};
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 10px;
+ `)}
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ flex-direction: column;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ font-size: 16px;
+ line-height: 19px;
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableWrapper = styled.div`
+ overflow-x: scroll;
+ padding-bottom: 20px;
+ scrollbar-width: thin;
+ scrollbar-color: #58321a #95613f;
+
+ &::-webkit-scrollbar {
+ height: 8px;
+ background: transparent;
+ border-radius: 8px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: linear-gradient(to right, #58321a 20%, #95613f 84.5%);
+ margin: 2px 82px 2px 2px;
+ }
+
+ &::-webkit-scrollbar-track {
+ border: 1px solid #351f11;
+ border-radius: 8px;
+ }
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px;
+ min-width: 800px;
+ border-collapse: collapse;
+ width: 100%;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th<{ name: string }>`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 5px 0px 0px 0px;
+ color: ${({ theme }) => theme.palette.brand};
+ white-space: ${({ name }) => (name.includes('\n') ? 'pre-wrap' : 'nowrap')};
+ position: sticky;
+ top: 0;
+ z-index: 1;
+`;
+
+const ClaimHeader = styled.div`
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 12px;
+`;
+
+const CheckBox = styled(checkbox)``;
+
+const DataRow = styled.tr`
+ padding-left: 16px;
+`;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+
+ ${breakpoints.phoneAndAbove(`
+ &:last-child {
+ text-align: right;
+ }
+ `)}
+`;
+
+const ButtonContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ align-items: center;
+ gap: 10px;
+ width: 100%;
+`;
+
+const TradeButton = styled(Button)`
+ padding: 10px 20px 10px 20px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark}; //if button is not active this is not used
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4); //if button is not active this is not used
+ border-radius: 10px;
+ font-weight: 700;
+ font-size: 12px;
+ line-height: 18px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/DataTables/TransactionsDataTable.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/DataTables/TransactionsDataTable.tsx
new file mode 100644
index 000000000..167837bff
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/DataTables/TransactionsDataTable.tsx
@@ -0,0 +1,196 @@
+import React, { useEffect, useState } from 'react';
+import styled from 'styled-components';
+import * as breakpoints from 'styles/breakpoints';
+
+export type Transaction = {
+ epoch: string;
+ type: 'Bid' | 'Claim';
+ transactionLink: string;
+};
+
+type TableHeader = { name: string };
+
+type TableProps = {
+ tableHeaders: TableHeader[];
+ transactions: Transaction[];
+ loading: boolean;
+ refetch?: () => void;
+ dataRefetching?: boolean;
+};
+
+export const DataTable: React.FC = ({
+ tableHeaders,
+ transactions,
+ loading,
+ refetch,
+ dataRefetching,
+}) => {
+ const [filter, setFilter] = useState('Last 5 Shown');
+ const [filteredTransactions, setFilteredTransactions] =
+ useState(transactions);
+ const filterOptions = ['Last 5 Shown', 'Show All'];
+
+ useEffect(() => {
+ if (filter === 'Last 5 Shown') {
+ setFilteredTransactions(transactions.slice(0, 5));
+ // setFilteredTransactions(transactions.slice(-5)); - that's if the last transactions are in end of the array
+ } else {
+ setFilteredTransactions(transactions);
+ }
+ }, [filter, transactions]);
+
+ return (
+
+
+ Transaction History
+
+ {filterOptions.map((option) => (
+ setFilter(option)}
+ selected={filter === option}
+ >
+ {option}
+
+ ))}
+
+
+
+
+
+
+ {tableHeaders.map((h) => (
+ {h.name}
+ ))}
+
+
+
+ {loading ? (
+
+ Loading...
+
+ ) : filteredTransactions.length === 0 ? (
+
+ No data available
+
+ ) : (
+ filteredTransactions.map((transaction) => (
+
+ {transaction.epoch}
+ {transaction.type}
+ {transaction.transactionLink}
+
+ ))
+ )}
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ padding: 40px 0px 24px 0px;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ gap: 32px;
+ `)}
+`;
+
+const Header = styled.div`
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ flex-direction: column;
+ gap: 10px;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ `)}
+`;
+
+const Title = styled.h3`
+ color: ${({ theme }) => theme.palette.brandLight};
+ font-size: 24px;
+ line-height: 44px;
+ margin: 0;
+`;
+
+const FilterContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ gap: 20px;
+`;
+
+const FilterButton = styled.button<{ selected: boolean }>`
+ font-size: 16px;
+ line-height: 19px;
+ background: none;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ border: none;
+ cursor: pointer;
+`;
+
+const TableWrapper = styled.div`
+ overflow-x: scroll;
+ padding-bottom: 20px;
+ scrollbar-width: thin;
+ scrollbar-color: #58321a #95613f;
+
+ &::-webkit-scrollbar {
+ height: 8px;
+ background: transparent;
+ border-radius: 8px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: linear-gradient(to right, #58321a 20%, #95613f 84.5%);
+ margin: 2px 82px 2px 2px;
+ }
+
+ &::-webkit-scrollbar-track {
+ border: 1px solid #351f11;
+ border-radius: 8px;
+ }
+`;
+
+const TableData = styled.table`
+ border-spacing: 10px
+ width: 100%;
+ border-collapse: collapse;
+ min-width: 500px;
+`;
+
+const HeaderRow = styled.tr`
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+`;
+
+const TableHeader = styled.th`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding-top: 5px;
+ width: 33.33%;
+ color: ${({ theme }) => theme.palette.brand};
+ position: sticky;
+ top: 0;
+ z-index: 1;
+`;
+
+const DataRow = styled.tr``;
+
+const DataCell = styled.td`
+ font-size: 13px;
+ font-weight: 700;
+ line-height: 20px;
+ text-align: left;
+ padding: 20px 0px 20px 0px;
+ width: 33.33%;
+ border-bottom: 1px solid ${({ theme }) => theme.palette.brand};
+ color: ${({ theme }) => theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/TopNav.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/TopNav.tsx
new file mode 100644
index 000000000..6cf48214c
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/TopNav.tsx
@@ -0,0 +1,79 @@
+import { useEffect, useState } from 'react';
+import { useLocation } from 'react-router-dom';
+import { TopNav } from 'components/Pages/Core/DappPages/SpiceBazaar/components/TopNav';
+import { MobileTopNavSecondary } from 'components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNavSecondary';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+enum EarnLocPaths {
+ Tgld = '/dapp/spice/myactivity/tgld',
+ Spice = '/dapp/spice/myactivity/spice',
+}
+
+const EarnConfig = [
+ {
+ label: 'Bids for TGLD',
+ linkTo: EarnLocPaths.Tgld,
+ },
+ // {
+ // label: 'Bids for Spice',
+ // linkTo: EarnLocPaths.Spice,
+ // },
+];
+
+export const MyActivityTopNav = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+ const loc = useLocation();
+ const [menuNavItems, setMenuNavItems] = useState(
+ EarnConfig.map((item) => ({
+ label: item.label,
+ path: item.linkTo,
+ selected: item.linkTo === loc.pathname,
+ }))
+ );
+
+ useEffect(() => {
+ setMenuNavItems((prevMenuNavItems) =>
+ prevMenuNavItems.map((menuItem) => ({
+ ...menuItem,
+ selected: menuItem.path === loc.pathname,
+ }))
+ );
+ }, [loc.pathname]);
+
+ const onSelectMenuNavItems = (selectedMenuItem: { label: string }) => {
+ setMenuNavItems(
+ menuNavItems.map((item) => {
+ if (item.label === selectedMenuItem.label) {
+ return { ...item, selected: true };
+ }
+ return { ...item, selected: false };
+ })
+ );
+ };
+
+ return (
+ <>
+ {isPhoneOrAbove ? (
+
+ ) : (
+
+ )}
+ >
+ );
+};
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/index.tsx
new file mode 100644
index 000000000..a46234110
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/MyActivity/index.tsx
@@ -0,0 +1,7 @@
+export const MyActivity = () => {
+ return (
+ <>
+ MyActivity
+ >
+ );
+};
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/TopNav.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/TopNav.tsx
new file mode 100644
index 000000000..bd8dcc629
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/TopNav.tsx
@@ -0,0 +1,114 @@
+import { useEffect, useState } from 'react';
+import { Outlet, useLocation } from 'react-router-dom';
+import styled from 'styled-components';
+import { TopNav } from './components/TopNav';
+import { MobileTopNav } from './components/MobileTopNav';
+import allSpices from 'assets/images/all-spices.svg?react';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+enum SpiceLocPaths {
+ Earn = '/dapp/spice/earn',
+ Bid = '/dapp/spice/bid',
+ MyActivity = '/dapp/spice/myactivity/tgld',
+ Analytics = '/dapp/spice/analytics',
+}
+
+const SpiceBazaarConfig = [
+ {
+ label: 'Earn Temple Gold',
+ linkTo: SpiceLocPaths.Earn,
+ },
+ // {
+ // label: 'Bid Temple Gold',
+ // linkTo: SpiceLocPaths.Bid,
+ // },
+ {
+ label: 'My Activity',
+ linkTo: SpiceLocPaths.MyActivity,
+ },
+ {
+ label: 'Analytics',
+ linkTo: SpiceLocPaths.Analytics,
+ },
+];
+
+export const SpiceBazaarTopNav = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+ const loc = useLocation();
+ const [menuNavItems, setMenuNavItems] = useState(
+ SpiceBazaarConfig.map((item) => ({
+ label: item.label,
+ path: item.linkTo,
+ selected: item.linkTo === loc.pathname,
+ }))
+ );
+
+ useEffect(() => {
+ setMenuNavItems((prevMenuNavItems) =>
+ prevMenuNavItems.map((menuItem) => ({
+ ...menuItem,
+ selected:
+ menuItem.path === location.pathname ||
+ (menuItem.path === '/dapp/spice/earn' &&
+ location.pathname.startsWith('/dapp/spice/earn')) ||
+ (menuItem.path === '/dapp/spice/bid' &&
+ location.pathname.startsWith('/dapp/spice/bid')) ||
+ (menuItem.path === '/dapp/spice/myactivity/tgld' &&
+ location.pathname.startsWith('/dapp/spice/myactivity')),
+ }))
+ );
+ }, [loc.pathname]);
+
+ const onSelectMenuNavItems = (selectedMenuItem: { label: string }) => {
+ setMenuNavItems(
+ menuNavItems.map((item) => {
+ if (item.label === selectedMenuItem.label) {
+ return { ...item, selected: true };
+ }
+ return { ...item, selected: false };
+ })
+ );
+ };
+
+ return (
+ <>
+ {isPhoneOrAbove && }
+
+
+ {isPhoneOrAbove ? (
+
+ ) : (
+
+ )}
+
+
+
+ >
+ );
+};
+const PageContainer = styled.div`
+ position: relative;
+ z-index: 1;
+`;
+
+const Content = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 60px;
+`;
+
+const AllSpices = styled(allSpices)`
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 0;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/CheckBox.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/CheckBox.tsx
new file mode 100644
index 000000000..22461db4a
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/CheckBox.tsx
@@ -0,0 +1,67 @@
+import { useState } from 'react';
+import styled from 'styled-components';
+import box from 'assets/icons/box.svg?react';
+import checkmark from 'assets/icons/checkmark-in-box.svg?react';
+
+type CustomCheckboxProps = {
+ onToggle?: (checked: boolean) => void;
+};
+
+const Checkbox: React.FC = ({ onToggle }) => {
+ const [checked, setChecked] = useState(false);
+
+ const handleClick = () => {
+ setChecked(!checked);
+ if (onToggle) {
+ onToggle(!checked);
+ }
+ };
+
+ return (
+
+
+
+ {checked && }
+
+
+ );
+};
+
+export default Checkbox;
+
+const CheckboxContainer = styled.div`
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ cursor: pointer;
+`;
+
+const CheckboxSvgWrapper = styled.div`
+ position: relative;
+ width: 24px;
+ height: 24px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+`;
+
+const StyledCircle = styled(box)`
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 24px;
+ height: 24px;
+`;
+
+const StyledCheckmark = styled(checkmark)`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 18px;
+ height: 18px;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/Input.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/Input.tsx
new file mode 100644
index 000000000..f240e85f9
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/Input.tsx
@@ -0,0 +1,195 @@
+import React, { InputHTMLAttributes, KeyboardEvent } from 'react';
+import styled, { css } from 'styled-components';
+import { theme } from 'styles/theme';
+
+interface InputStyledProps {
+ valueFontSize?: string;
+ valueLineHeight?: string;
+}
+
+interface SizeProps {
+ small?: boolean;
+ width?: number | string | undefined;
+}
+
+export interface CryptoValue {
+ kind: 'value';
+ value: string;
+}
+
+export interface InputProps
+ extends SizeProps,
+ InputHTMLAttributes {
+ hint?: string;
+ crypto?: CryptoValue;
+ isNumber?: boolean;
+
+ // Callback for input value change
+ handleChange?(value: number | string): void;
+
+ onHintClick?(): void;
+ suffix?: string;
+
+ valueFontSize?: string;
+ valueLineHeight?: string;
+}
+
+export const Input = ({
+ handleChange,
+ onHintClick,
+ hint,
+ crypto,
+ isNumber,
+ type,
+ value,
+ disabled,
+ valueFontSize,
+ valueLineHeight,
+ ...props
+}: InputProps) => {
+ const renderCrypto = () => {
+ if (!crypto) return null;
+ if (crypto.kind === 'value') return {crypto.value};
+ };
+
+ const handleInputChange = (event: React.ChangeEvent) => {
+ if (!handleChange) return;
+ const val = event.target.value;
+ if (isNumber) {
+ // if starting with a period, prepend 0
+ if (val.charAt(0) === '.') {
+ handleChange('0' + val);
+ return;
+ }
+ // don't allow multiple periods
+ if (val.indexOf('.') != val.lastIndexOf('.')) {
+ event.preventDefault();
+ return;
+ }
+ }
+ handleChange(val);
+ };
+
+ // using onKeyPress instead of onChange,
+ // otherwise cursor jumps around when editing in the middle
+ const numbersOnly = (event: KeyboardEvent) => {
+ if (!/\.|\d/.test(event.key)) {
+ event.preventDefault();
+ }
+ };
+
+ return (
+
+
+ {renderCrypto()}
+ {hint && (
+ {
+ if (onHintClick) onHintClick();
+ }}
+ >
+ {hint}
+
+ )}
+
+
+
+ );
+};
+
+interface InputWrapperProps extends SizeProps {
+ isDisabled?: boolean;
+}
+
+export const InputWrapper = styled.div`
+ display: flex;
+ position: relative;
+ box-sizing: border-box;
+ background-color: ${(props) => props.theme.palette.dark};
+ border: 1px solid ${(props) => props.theme.palette.brand};
+ width: ${({ width }) => width || '90%'};
+ border-radius: 10px;
+ padding: 10px;
+ gap: 10px;
+
+ ${(props) =>
+ props.isDisabled &&
+ css`
+ background-color: ${(props) => props.theme.palette.brand25};
+ `}
+`;
+
+const InputTokenWrapper = styled.div`
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: left;
+ gap: 5px;
+`;
+
+interface InputHintProps {
+ hasAction: boolean;
+}
+
+export const InputHint = styled.small`
+ color: ${theme.palette.brand};
+ font-size: 12px;
+ line-height: 18px;
+ font-weight: 700;
+ text-align: center;
+ width: max-content;
+ margin-top: 0.15rem;
+
+ ${(props) =>
+ props.hasAction &&
+ css`
+ border-radius: 0.25em;
+ cursor: pointer;
+ `}
+`;
+
+export const InputStyled = styled.input`
+ ${theme.typography.fonts.fontHeading};
+ color: ${theme.palette.brand};
+ background-color: transparent;
+ border: none;
+ outline: none;
+ width: 100%;
+ font-size: ${({ valueFontSize }) =>
+ valueFontSize || '18px'}; // Use the prop or default to 18px
+ line-height: ${({ valueLineHeight }) =>
+ valueLineHeight || '33px'}; // Use the prop or default to 33px
+ font-weight: 400;
+ letter-spacing: 0.05em;
+ text-align: right;
+ padding-left: 0.5rem;
+
+ // remove input number controls ^ v
+ &[type='number']::-webkit-inner-spin-button,
+ &[type='number']::-webkit-outer-spin-button {
+ appearance: none;
+ margin: 0;
+ }
+
+ appearance: textfield;
+`;
+
+const Ticker = styled.h3`
+ font-size: 18px;
+ font-weight: 400;
+ line-height: 33px;
+ text-wrap: nowrap;
+ margin: 0;
+ color: ${theme.palette.brandLight};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNav.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNav.tsx
new file mode 100644
index 000000000..e59a4b937
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNav.tsx
@@ -0,0 +1,88 @@
+import { useNavigate } from 'react-router-dom';
+import styled from 'styled-components';
+
+interface NavCellProps {
+ selected: boolean;
+}
+
+export type MenuNavItem = {
+ label: string;
+ path: string;
+ selected: boolean;
+};
+
+type TopNavProps = {
+ menuNavItems: {
+ label: string;
+ path: string;
+ selected: boolean;
+ }[];
+ onSelectMenuNavItems: (mi: MenuNavItem) => void;
+};
+
+export const MobileTopNav = (props: TopNavProps) => {
+ const { menuNavItems, onSelectMenuNavItems } = props;
+
+ const navigate = useNavigate();
+
+ return (
+
+ {menuNavItems.map((item) => (
+ {
+ onSelectMenuNavItems(item);
+ navigate(item.path);
+ }}
+ >
+ {item.label}
+
+ ))}
+
+ );
+};
+
+const TopNavContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ height: 64px;
+ align-items: left;
+ border-top: 1px solid ${({ theme }) => theme.palette.brand};
+ padding: 8px 8px 4px 8px;
+ gap: 10px;
+ margin-top: -25px;
+ margin-left: -20px;
+ margin-right: -20px;
+
+ /* Enable horizontal scrolling */
+ overflow-x: auto;
+ white-space: nowrap;
+
+ &::-webkit-scrollbar {
+ display: none;
+ }
+`;
+
+const NavCell = styled.div`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 16px 12px;
+ min-width: 181px;
+ border: 1px solid;
+ border-image-source: linear-gradient(
+ 180deg,
+ #643c22 0%,
+ #95613f 52.5%,
+ #58321a 99.5%
+ );
+ border-image-slice: 1;
+
+ font-size: 16px;
+ line-height: 20px;
+ font-weight: 700;
+ cursor: pointer;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNavSecondary.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNavSecondary.tsx
new file mode 100644
index 000000000..defe64daa
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/MobileTopNavSecondary.tsx
@@ -0,0 +1,72 @@
+import { useNavigate } from 'react-router-dom';
+import styled from 'styled-components';
+
+interface NavCellProps {
+ selected: boolean;
+}
+
+export type MenuNavItem = {
+ label: string;
+ path: string;
+ selected: boolean;
+};
+
+type TopNavProps = {
+ menuNavItems: {
+ label: string;
+ path: string;
+ selected: boolean;
+ }[];
+ onSelectMenuNavItems: (mi: MenuNavItem) => void;
+};
+
+export const MobileTopNavSecondary = (props: TopNavProps) => {
+ const { menuNavItems, onSelectMenuNavItems } = props;
+
+ const navigate = useNavigate();
+
+ return (
+
+ {menuNavItems.map((item) => (
+ {
+ onSelectMenuNavItems(item);
+ navigate(item.path);
+ }}
+ >
+ {item.label}
+
+ ))}
+
+ );
+};
+
+const TopNavContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ width: 181px;
+ align-items: left;
+ margin-top: -40px;
+ margin-left: -20px;
+ padding-left: 8px;
+`;
+
+const NavCell = styled.div`
+ display: flex;
+ align-items: center;
+ padding: 10px 16px;
+ min-width: 181px;
+
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ background: ${({ selected }) =>
+ selected
+ ? 'linear-gradient(180deg, #353535 45.25%, #101010 81.46%, #0B0A0A 87.55%)'
+ : 'linear-gradient(180deg, #5E402C 0%, #0C0B0B 100%)'};
+ font-size: 14px;
+ line-height: 18px;
+ font-weight: 700;
+ cursor: pointer;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl/PageRangeSelector.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl/PageRangeSelector.tsx
new file mode 100644
index 000000000..a5106ee2f
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl/PageRangeSelector.tsx
@@ -0,0 +1,50 @@
+import { Dispatch, SetStateAction } from 'react';
+import { useRangePagination } from 'hooks/use-range-pagination';
+import { PageLink } from '.';
+import styled from 'styled-components';
+
+type Props = {
+ currentPage: number;
+ setCurrentPage: Dispatch>;
+ totalPages: number;
+};
+
+export const PageRangeSelector = (props: Props) => {
+ const { setCurrentPage, totalPages, currentPage } = props;
+
+ const paginationRange = useRangePagination({
+ currentPage,
+ totalPages,
+ });
+
+ if (!paginationRange) return null;
+
+ if (currentPage === 0 || paginationRange.length < 2) {
+ return null;
+ }
+
+ return (
+ <>
+ {paginationRange.map((pageNumber) => {
+ if (pageNumber === -1)
+ return ...;
+ return (
+ setCurrentPage(pageNumber)}
+ selected={currentPage === pageNumber}
+ >
+ {pageNumber}
+
+ );
+ })}
+ >
+ );
+};
+
+const DotsContainer = styled.div`
+ {
+ margin: 2px 5px;
+ color: ${({ theme }) => theme.palette.brand};
+ }
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl/index.tsx
new file mode 100644
index 000000000..ae25d47b3
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/PaginationControl/index.tsx
@@ -0,0 +1,99 @@
+import { Dispatch, SetStateAction } from 'react';
+import styled from 'styled-components';
+import { PageRangeSelector } from './PageRangeSelector';
+import lastPage from 'assets/icons/last_page.svg?react';
+import firstPage from 'assets/icons/first_page.svg?react';
+import left from 'assets/icons/chevron_left.svg?react';
+import right from 'assets/icons/chevron_right.svg?react';
+
+type PaginationControlProps = {
+ currentPage: number;
+ totalPages: number;
+ setCurrentPage: Dispatch>;
+};
+
+export const PaginationControl = (props: PaginationControlProps) => {
+ const { totalPages, currentPage, setCurrentPage } = props;
+
+ return (
+
+
+ setCurrentPage((prev) => prev - 1)}
+ disabled={currentPage === 1}
+ >
+
+
+ setCurrentPage((prev) => prev + 1)}
+ disabled={currentPage === totalPages}
+ >
+
+
+ setCurrentPage(1)} disabled={currentPage === 1}>
+
+
+ setCurrentPage(totalPages)}
+ disabled={currentPage === totalPages}
+ >
+
+
+
+ );
+};
+
+const PaginationContainer = styled.div`
+ display: flex;
+ justify-content: flex-end;
+ text-align: right;
+ align-items: center;
+`;
+
+type PageLinkProps = {
+ selected?: boolean;
+ disabled?: boolean;
+};
+
+export const PageLink = styled.button`
+ margin: 0 5px;
+ color: ${({ selected, disabled, theme }) =>
+ disabled
+ ? theme.palette.brand50
+ : selected
+ ? theme.palette.brandLight
+ : theme.palette.brand};
+ font-size: 16px;
+ font-weight: 700;
+ line-height: 19px;
+ border: none;
+ padding: 0;
+ cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
+ background: none;
+ box-shadow: none;
+ border-radius: 0px;
+`;
+
+const LeftPageIcon = styled(left)`
+ width: 24px;
+ height: 24px;
+`;
+
+const RightPageIcon = styled(right)`
+ width: 24px;
+ height: 24px;
+`;
+
+const FirstPageIcon = styled(firstPage)`
+ width: 24px;
+ height: 24px;
+`;
+
+const LastPageIcon = styled(lastPage)`
+ width: 24px;
+ height: 24px;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/Popover.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/Popover.tsx
new file mode 100644
index 000000000..0b7c6f1be
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/Popover.tsx
@@ -0,0 +1,99 @@
+import { useRef, FC, ReactNode, useEffect } from 'react';
+import styled from 'styled-components';
+import { backgroundImage, buttonResets } from 'styles/mixins';
+import { useOutsideClick } from 'hooks/use-outside-click';
+import close from 'assets/icons/close.svg';
+
+interface Props {
+ onClose: () => void;
+ isOpen: boolean;
+ closeOnClickOutside?: boolean;
+ closeOnEscape?: boolean;
+ showCloseButton?: boolean;
+ header?: ReactNode;
+ children?: React.ReactNode;
+}
+
+export const Popover: FC = ({
+ onClose,
+ isOpen,
+ closeOnClickOutside = false,
+ showCloseButton = true,
+ closeOnEscape = false,
+ children,
+ header,
+}) => {
+ const ref = useRef(null);
+
+ useOutsideClick(ref, () => {
+ if (!closeOnClickOutside) return;
+ onClose();
+ });
+
+ // Close modal on escape
+ useEffect(() => {
+ if (!closeOnEscape || !isOpen) return;
+ const onEscape = (evt: KeyboardEvent) => {
+ if (evt.key === 'Escape') onClose();
+ };
+ window.addEventListener('keyup', onEscape);
+ return () => window.removeEventListener('keyup', onEscape);
+ }, [closeOnEscape, isOpen]);
+
+ return (
+ <>
+ {isOpen && }
+
+ {header && }
+ {showCloseButton && onClose()} />}
+ {children}
+
+ >
+ );
+};
+
+const CloseIcon = styled.button`
+ ${backgroundImage(close)}
+ ${buttonResets}
+ width: 24px;
+ height: 24px;
+ position: absolute;
+ right: 2rem;
+ top: 26.5px;
+`;
+
+const Header = styled.h4`
+ font-size: 1.5rem;
+ text-align: center;
+ color: ${({ theme }) => theme.palette.brandLight};
+ background:
+ margin-top: 0;
+ margin-bottom: 1rem;
+`;
+
+const Wrapper = styled.div<{ isOpen: boolean }>`
+ display: ${({ isOpen }) => (isOpen ? 'flex' : 'none')};
+ background: ${({ theme }) => theme.palette.black};
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ z-index: 10;
+ padding-bottom: 32px;
+ flex-direction: column;
+ // height: 707px;
+ box-shadow: 0 0 4rem rgba(0, 0, 0, 0.8);
+ border-radius: 10px;
+ border: 1px solid ${({ theme }) => theme.palette.brand};
+ gap: 10px;
+`;
+
+const Dimmer = styled.div`
+ background: rgba(0, 0, 0, 0.4);
+ position: fixed;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ z-index: 9;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/RoundCheckBox.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/RoundCheckBox.tsx
new file mode 100644
index 000000000..4107e7047
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/RoundCheckBox.tsx
@@ -0,0 +1,90 @@
+import { useState } from 'react';
+import styled from 'styled-components';
+
+interface CustomCheckboxProps {
+ children: React.ReactNode;
+ onToggle: (checked: boolean) => void;
+ disabled?: boolean;
+}
+
+const RoundCheckbox = ({
+ children,
+ onToggle,
+ disabled = false,
+}: CustomCheckboxProps) => {
+ const [isChecked, setIsChecked] = useState(false);
+
+ const handleToggle = () => {
+ if (disabled) return;
+ setIsChecked(!isChecked);
+ onToggle(!isChecked);
+ };
+
+ return (
+
+ {}}
+ disabled={disabled}
+ />
+
+
+
+
+
+
+
+ );
+};
+
+const CheckboxContainer = styled.div<{ disabled?: boolean }>`
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
+ opacity: ${(props) => (props.disabled ? 0.5 : 1)};
+`;
+
+const HiddenCheckbox = styled.input`
+ border: 0;
+ clip: rect(0 0 0 0);
+ clippath: inset(50%);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ white-space: nowrap;
+ width: 1px;
+`;
+
+const StyledCheckbox = styled.div<{ checked: boolean; disabled?: boolean }>`
+ display: inline-block;
+ width: 16px;
+ height: 16px;
+ background: ${(props) =>
+ props.checked ? props.theme.palette.brand : 'transparent'};
+ border: 2px solid ${(props) => props.theme.palette.brand};
+ border-radius: 50%;
+ transition: all 150ms;
+ opacity: ${(props) => (props.disabled ? 0.5 : 1)};
+
+ svg {
+ visibility: ${(props) => (props.checked ? 'visible' : 'hidden')};
+ }
+`;
+
+const Icon = styled.svg`
+ fill: none;
+ stroke: white;
+ stroke-width: 2px;
+`;
+
+const Label = styled.span<{ disabled?: boolean }>`
+ color: ${(props) => props.theme.palette.brandLight};
+ opacity: ${(props) => (props.disabled ? 0.5 : 1)};
+`;
+
+export default RoundCheckbox;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/TopNav.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/TopNav.tsx
new file mode 100644
index 000000000..9b9fb75dc
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/components/TopNav.tsx
@@ -0,0 +1,147 @@
+import { useNavigate } from 'react-router-dom';
+import styled from 'styled-components';
+import selector from 'assets/icons/selector.svg?react';
+
+interface TopNavContainerProps {
+ height?: string;
+ borderButtomGradient?: string;
+ borderBottomWidth?: string;
+ backgroundColor?: string;
+}
+
+interface NavCellProps {
+ selected: boolean;
+ fontWeight?: number;
+ borderVerticalStyle?: string;
+}
+
+export type MenuNavItem = {
+ label: string;
+ path: string;
+ selected: boolean;
+};
+
+type TopNavProps = {
+ menuNavItems: {
+ label: string;
+ path: string;
+ selected: boolean;
+ }[];
+ onSelectMenuNavItems: (mi: MenuNavItem) => void;
+ showSelector?: boolean;
+ height?: string;
+ fontWeight?: number;
+ borderButtomGradient?: string;
+ borderVerticalStyle?: string;
+ borderBottomWidth?: string;
+ backgroundColor?: string;
+};
+
+export const TopNav = (props: TopNavProps) => {
+ const {
+ menuNavItems,
+ onSelectMenuNavItems,
+ showSelector,
+ height,
+ fontWeight,
+ borderButtomGradient,
+ borderVerticalStyle,
+ borderBottomWidth,
+ backgroundColor,
+ } = props;
+
+ const navigate = useNavigate();
+
+ return (
+
+ {menuNavItems.map((item) => (
+ {
+ onSelectMenuNavItems(item);
+ navigate(item.path);
+ }}
+ fontWeight={fontWeight}
+ borderVerticalStyle={borderVerticalStyle}
+ >
+ {item.label}
+ {item.selected && showSelector && (
+
+
+
+ )}
+
+ ))}
+
+ );
+};
+
+const TopNavContainer = styled.div`
+ display: flex;
+ flex-direction: row;
+ height: ${({ height }) => height || '78px'};
+ align-items: left;
+ border-bottom: ${({ borderBottomWidth }) => borderBottomWidth || '1px'} solid;
+ border-image-source: ${({ borderButtomGradient }) =>
+ borderButtomGradient ||
+ 'linear-gradient(90deg, #58321A 20%, #95613F 84.5%)'};
+ border-image-slice: 1;
+ padding: 0px 90px;
+ margin-top: -40px;
+ margin-left: -120px;
+ margin-right: -120px;
+ background: ${({ backgroundColor, theme }) =>
+ backgroundColor || `${theme.palette.black}4C`};
+`;
+
+const NavCell = styled.div`
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 10px 20px;
+ min-width: 200px;
+ border-right: ${({ borderVerticalStyle }) =>
+ borderVerticalStyle ? `${borderVerticalStyle} solid` : '1px solid'};
+ border-image-source: ${({ borderVerticalStyle }) =>
+ borderVerticalStyle
+ ? 'linear-gradient(180deg, #643C22 0%, #95613F 52.5%, #58321A 99.5%)'
+ : 'linear-gradient(180deg, #643C22 0%, #95613F 52.5%, #58321A 99.5%)'};
+ border-image-slice: 1;
+ &:first-child {
+ border-left: ${({ borderVerticalStyle }) =>
+ borderVerticalStyle ? `${borderVerticalStyle} solid` : '1px solid'};
+ border-image-source: ${({ borderVerticalStyle }) =>
+ borderVerticalStyle
+ ? 'linear-gradient(180deg, #643C22 0%, #95613F 52.5%, #58321A 99.5%)'
+ : 'linear-gradient(180deg, #643C22 0%, #95613F 52.5%, #58321A 99.5%)'};
+ }
+ font-size: 16px;
+ line-height: 20px;
+ font-weight: ${({ fontWeight }) => fontWeight || 700};
+ height: 100%;
+ cursor: pointer;
+ color: ${({ selected, theme }) =>
+ selected ? theme.palette.brandLight : theme.palette.brand};
+ position: relative;
+ z-index: 2;
+`;
+
+const SelectorWrapper = styled.div<{ selected: boolean }>`
+ position: absolute;
+ bottom: -55%;
+ left: 45%; // make something to be sure it,s in the middle
+ width: 100%;
+ z-index: 3;
+ pointer-events: none;
+`;
+
+const Selector = styled(selector)`
+ // width: 19px;
+ // height: 24px;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/index.tsx b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/index.tsx
new file mode 100644
index 000000000..a10908246
--- /dev/null
+++ b/apps/dapp/src/components/Pages/Core/DappPages/SpiceBazaar/index.tsx
@@ -0,0 +1,272 @@
+import styled from 'styled-components';
+import { useNavigate } from 'react-router-dom';
+import linkSvg from 'assets/icons/link.svg?react';
+import templeDaoLogo from 'assets/images/temple-dao-logo.svg?react';
+import spiceBazaar from 'assets/images/spice-bazaar.svg?react';
+import { Button } from 'components/Button/Button';
+import spice1 from 'assets/images/spice1.svg?react';
+import spice2 from 'assets/images/spice2.svg?react';
+import spice3 from 'assets/images/spice3.svg?react';
+import spice4 from 'assets/images/spice4.svg?react';
+import spice5 from 'assets/images/spice-all-spices.svg?react';
+import * as breakpoints from 'styles/breakpoints';
+import { useMediaQuery } from 'react-responsive';
+import { queryPhone } from 'styles/breakpoints';
+
+export const SpiceBazaarPage = () => {
+ const isPhoneOrAbove = useMediaQuery({
+ query: queryPhone,
+ });
+ const navigate = useNavigate();
+ return (
+
+ {isPhoneOrAbove && (
+
+
+
+
+
+
+
+ )}
+
+
+
+ Spice Bazaar
+
+
+ {isPhoneOrAbove ? (
+
+ Welcome to the Spice Bazaar,
+ a marketplace where you can
+ earn Temple Gold and spend
+ them to acquire valuable
+ tokens from the Treasury.
+
+ ) : (
+
+
+ Welcome to the Spice Bazaar,
+ a marketplace where you can
+ earn Temple Gold and spend
+ them to acquire valuable
+ tokens from the Treasury.
+
+
+ )}
+
+
+
+ navigate('earn')}>
+ EARN TEMPLE GOLD
+
+ navigate('bid')}>
+ BID TEMPLE GOLD
+
+
+
+
+
+
+
+ );
+};
+
+const PageContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ position: relative;
+ overflow: hidden;
+ gap: 60px;
+ margin-top: -40px;
+
+ ${breakpoints.phoneAndAbove(`
+ margin-bottom: -80px;
+ margin-right: -120px;
+ margin-left: -120px;
+ `)}
+`;
+
+const BackgroundContainer = styled.div`
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 0;
+ overflow: hidden;
+`;
+
+const MainContainer = styled.div`
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ padding: 20px;
+ gap: 20px;
+ z-index: 1;
+ overflow: hidden;
+
+ ${breakpoints.phoneAndAbove(`
+ flex-direction: row;
+ align-self: center;
+ width: 1200px;
+ height: 706px;
+ margin-top: 110px;
+ padding: 0px;
+ gap: 40px;
+ `)}
+`;
+
+const LeftContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+
+ ${breakpoints.phoneAndAbove(`
+ padding: 40px 80px 80px 80px;
+ `)}
+`;
+
+const Title = styled.h2`
+ display: flex;
+ align-items: center;
+ font-size: 36px;
+ font-weight: 400;
+ text-align: center;
+ line-height: 67px;
+ color: ${({ theme }) => theme.palette.brandLight};
+ gap: 15px;
+ margin: 0px;
+`;
+
+const LinkIcon = styled(linkSvg)`
+ fill: ${({ theme }) => theme.palette.brand};
+ cursor: pointer;
+`;
+
+const Text = styled.div`
+ font-size: 18px;
+ line-height: 22px;
+ font-weight: 700;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const TextMobileContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+`;
+
+const TextMobile = styled.div`
+ font-size: 16px;
+ line-height: 19px;
+ font-weight: 700;
+ color: ${({ theme }) => theme.palette.brand};
+`;
+
+const RightContainer = styled.div`
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+`;
+
+const BackgroundImage = styled(spiceBazaar)`
+ z-index: 2;
+ width: 290px;
+ height: 300px;
+ top: 20%;
+
+ ${breakpoints.phoneAndAbove(`
+ width: 682px;
+ height: 707px;
+ `)}
+`;
+
+const Logo = styled(templeDaoLogo)`
+ width: 109px;
+ height: 104px;
+ position: absolute;
+ top: 71%;
+ left: 33%;
+ z-index: 3;
+
+ ${breakpoints.phoneAndAbove(`
+ top: 22%;
+ left: 57%;
+ width: 180px;
+ height: 170px;
+ `)}
+`;
+
+const ButtoonsContainer = styled.div`
+ background: linear-gradient(
+ 90deg,
+ rgba(196, 196, 196, 0) 0.49%,
+ rgba(89, 89, 89, 0.48) 50.04%,
+ rgba(196, 196, 196, 0) 100%
+ );
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-top: 20px;
+ margin-bottom: 20px;
+ gap: 12px;
+ height: 100%;
+ width: auto;
+
+ ${breakpoints.phoneAndAbove(`
+ padding: 0px 10px 0px 10px;
+ position: absolute;
+ top: 49%;
+ left: 53%;
+ z-index: 4;
+ height: auto;
+ `)}
+`;
+
+const TradeButton = styled(Button)`
+ padding: 10px 20px 10px 20px;
+ min-width: 205px;
+ width: ${(props) => props.width || 'min-content'};
+ height: min-content;
+ background: ${({ theme }) => theme.palette.gradients.dark};
+ border: 1px solid ${({ theme }) => theme.palette.brandDark};
+ box-shadow: 0px 0px 20px rgba(222, 92, 6, 0.4);
+ border-radius: 10px;
+ font-size: 16px;
+ line-height: 19px;
+ text-transform: uppercase;
+ color: ${({ theme }) => theme.palette.brandLight};
+ whitespace: 'nowrap';
+ margin: 0px;
+`;
+
+const Spice1 = styled(spice1)`
+ position: absolute;
+ bottom: 0;
+ left: 0;
+`;
+
+const Spice2 = styled(spice2)`
+ position: absolute;
+ bottom: 0;
+ left: 17%;
+`;
+
+const Spice3 = styled(spice3)`
+ position: absolute;
+ bottom: 5%;
+ left: 13%;
+`;
+
+const Spice4 = styled(spice4)`
+ position: absolute;
+ bottom: 0;
+ right: 0px;
+`;
+
+const Spice5 = styled(spice5)`
+ position: absolute;
+ top: 0;
+ right: 0;
+`;
diff --git a/apps/dapp/src/components/Pages/Core/DappPages/TradePage.tsx b/apps/dapp/src/components/Pages/Core/DappPages/TradePage.tsx
index f71529cb5..34d7ffdfa 100644
--- a/apps/dapp/src/components/Pages/Core/DappPages/TradePage.tsx
+++ b/apps/dapp/src/components/Pages/Core/DappPages/TradePage.tsx
@@ -1,44 +1,14 @@
import styled from 'styled-components';
-import { TradeWidget } from './Trade/TradeWidget';
-import { useConnectWallet } from '@web3-onboard/react';
-import { useWallet } from 'providers/WalletProvider';
-import { TradeButton } from '../NewUI/Home';
+import { Trade } from '../NewUI/TradeNew';
export const TradePage = () => {
- const [{}, connect] = useConnectWallet();
- const { wallet } = useWallet();
-
return (
- Trade
- {wallet ? (
-
- ) : (
- {
- connect();
- }}
- style={{ whiteSpace: 'nowrap' }}
- >
- Connect Wallet
-
- )}
+
);
};
-const HeaderText = styled.div`
- height: 32px;
- font-size: 36px;
- line-height: 42px;
- display: flex;
- align-items: center;
- text-align: center;
- color: #ffdec9;
- margin-top: 10px;
- margin-bottom: 40px;
-`;
-
const TradeContainer = styled.div`
display: flex;
flex-direction: column;
diff --git a/apps/dapp/src/components/Pages/Core/NewUI/Home.tsx b/apps/dapp/src/components/Pages/Core/NewUI/Home.tsx
index 121c5972d..1de33ebf5 100644
--- a/apps/dapp/src/components/Pages/Core/NewUI/Home.tsx
+++ b/apps/dapp/src/components/Pages/Core/NewUI/Home.tsx
@@ -17,7 +17,7 @@ import { TemplePriceChart } from './PriceChart';
import { RAMOSMetrics } from './RAMOSMetrics';
import { Button } from 'components/Button/Button';
import { useEffect, useState } from 'react';
-import { queryRamosData, queryTrvData, subgraphQuery } from 'utils/subgraph';
+import { fetchGenericSubgraph } from 'utils/subgraph';
import env from 'constants/env';
interface Metrics {
@@ -105,14 +105,23 @@ const Home = ({ tlc }: { tlc?: boolean }) => {
useEffect(() => {
const fetchMetrics = async () => {
- const treasuryData = await subgraphQuery(
+ const { data: treasuryData } = await fetchGenericSubgraph(
env.subgraph.templeV2Balances,
- queryTrvData()
+ `{
+ treasuryReservesVaults {
+ principalUSD
+ benchmarkedEquityUSD
+ treasuryPriceIndex
+ }
+ }`
);
-
- const ramosData = await subgraphQuery(
+ const { data: ramosData } = await fetchGenericSubgraph(
env.subgraph.ramos,
- queryRamosData()
+ `{
+ metrics {
+ spotPrice
+ }
+ }`
);
const treasuryMetrics = treasuryData.treasuryReservesVaults[0];
diff --git a/apps/dapp/src/components/Vault/utils.ts b/apps/dapp/src/components/Vault/utils.ts
index 8e13f0f0f..3e087aea0 100644
--- a/apps/dapp/src/components/Vault/utils.ts
+++ b/apps/dapp/src/components/Vault/utils.ts
@@ -287,5 +287,6 @@ export const formatJoiningFee = (
export const getTokenInfo = (symbol: TICKER_SYMBOL): Token => {
const tokenInFormat = symbol.toLowerCase().replace('$', '') as keyof Tokens;
const tokenInfo = env.tokens[tokenInFormat];
+ console.log('---- tokenInfo: ', tokenInfo);
return tokenInfo;
};
diff --git a/apps/dapp/src/constants/env/local.tsx b/apps/dapp/src/constants/env/local.tsx
index a27828d45..89b175cc2 100644
--- a/apps/dapp/src/constants/env/local.tsx
+++ b/apps/dapp/src/constants/env/local.tsx
@@ -1,16 +1,13 @@
import { ADDRESS_ZERO } from 'utils/bigNumber';
import { Environment } from './types';
-const ENV_VARS = import.meta.env;
-const BALANCER_SUBGRAPH_API_KEY = ENV_VARS.VITE_BALANCER_SUBGRAPH_API_KEY;
-const ENABLE_SUBGRAPH_LOGS = ENV_VARS.VITE_ENABLE_SUBGRAPH_LOGS === 'true';
+const BALANCER_SUBGRAPH_API_KEY = import.meta.env
+ .VITE_BALANCER_SUBGRAPH_API_KEY;
const env: Environment = {
alchemyId: '-nNWThz_YpX1cGffGiz-lbSMu7dmp4GK',
rpcUrl: 'https://rpc.ankr.com/eth',
backendUrl: 'http://localhost:3001',
- tradeTokenListUrl:
- 'https://sf294otxgnbicood.public.blob.vercel-storage.com/testnet-tokens-acdWvsxlYFCXUEjNZmcxd4DRB4fXAb.json',
contracts: {
balancerVault: '',
farmingWallet: '',
@@ -29,6 +26,7 @@ const env: Environment = {
olympus: '',
otcOffer: '',
temple: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
+ templegold: '',
templeStaking: '0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6',
templeV2FraxPair: '',
templeV2Router: '',
@@ -53,6 +51,10 @@ const env: Environment = {
},
daiCircuitBreaker: '',
templeCircuitBreaker: '',
+ spiceBazaar: {
+ templeGoldStaking: '',
+ daiGoldAuction: '',
+ },
},
infuraId: '4cd22916292d4fb6be156454978c326b',
subgraph: {
@@ -75,6 +77,11 @@ const env: Environment = {
},
etherscan: 'https://sepolia.etherscan.io',
tokens: {
+ tgld: {
+ name: 'Temple Gold',
+ address: '',
+ decimals: 18,
+ },
frax: {
name: 'Frax',
address: '',
@@ -143,7 +150,6 @@ const env: Environment = {
// address: '0x5CE28cAE5aAb002DcBc076d5A551A473a7C9dF89',
// },
],
- enableSubgraphLogs: ENABLE_SUBGRAPH_LOGS,
};
export default env;
diff --git a/apps/dapp/src/constants/env/preview.tsx b/apps/dapp/src/constants/env/preview.tsx
index fdfa72922..e57b18f77 100644
--- a/apps/dapp/src/constants/env/preview.tsx
+++ b/apps/dapp/src/constants/env/preview.tsx
@@ -1,16 +1,13 @@
import { ADDRESS_ZERO } from 'utils/bigNumber';
import { Environment } from './types';
-const ENV_VARS = import.meta.env;
-const BALANCER_SUBGRAPH_API_KEY = ENV_VARS.VITE_BALANCER_SUBGRAPH_API_KEY;
-const ENABLE_SUBGRAPH_LOGS = ENV_VARS.VITE_ENABLE_SUBGRAPH_LOGS === 'true';
+const BALANCER_SUBGRAPH_API_KEY = import.meta.env
+ .VITE_BALANCER_SUBGRAPH_API_KEY;
const env: Environment = {
alchemyId: 'AorwfDdHDsEjIX4HPwS70zkVjWqjv5vZ',
rpcUrl: 'https://rpc.ankr.com/eth',
backendUrl: 'https://backend-stage.templedao.link',
- tradeTokenListUrl:
- 'https://sf294otxgnbicood.public.blob.vercel-storage.com/testnet-tokens-BCYU6hCLdzUdj1TvvTOcw5ux8Wxmhj.json',
contracts: {
balancerVault: '',
exitQueue: '',
@@ -19,7 +16,7 @@ const env: Environment = {
frax: '',
usdc: '',
usdt: '',
- dai: '0x33FA9618365F67c5345066d5Cfd7f3A2f183599A',
+ dai: '0xBe9162230D9e637218D74C7f41f62ef2385fEe64',
weth: '',
frax3CrvFarming: '',
frax3CrvFarmingRewards: '',
@@ -28,7 +25,8 @@ const env: Environment = {
ogTemple: '',
olympus: '0xf7f739Bb945880aD0398122069Fd3beC282c6621',
otcOffer: '0x09fdf85893c1277bdc9ef1be2acdf29ee5e19771',
- temple: '0x64a925B0fA211c44337148C0807f959Bd44b0B67',
+ temple: '0x98c5e61b1b3731a1f379e8770861164d23118cdc',
+ templegold: '0x2ae6318e34bb97ae3755afce75559452aa223a5d',
templeStaking: '',
templeV2FraxPair: '',
templeV2Router: '',
@@ -53,6 +51,10 @@ const env: Environment = {
},
daiCircuitBreaker: '0x30AC664062f58b6E4DF187713a2352385633B739',
templeCircuitBreaker: '0x8f783c4A3d90712A794d5660b632AC67611852aF',
+ spiceBazaar: {
+ templeGoldStaking: '0xdbDAc0FCA9cF8CA2F2Ef718775f0F265f581808F',
+ daiGoldAuction: '0x8d3671d794d511Bb0E3D28e260F8E2233C0653aB',
+ },
},
subgraph: {
templeCore:
@@ -87,6 +89,12 @@ const env: Environment = {
ascendQuote: 10_000,
},
tokens: {
+ tgld: {
+ name: 'Temple Gold',
+ address: '0x2ae6318e34bb97ae3755AFcE75559452aA223A5D',
+ decimals: 18,
+ symbol: 'TGLD',
+ },
frax: {
name: 'Frax',
address: '0x73651AD693531F9937528009cC204a4d9b696a68',
@@ -95,7 +103,7 @@ const env: Environment = {
},
temple: {
name: 'Temple',
- address: '0x64a925B0fA211c44337148C0807f959Bd44b0B67',
+ address: '0x98c5e61b1b3731a1f379e8770861164d23118cdc',
decimals: 18,
symbol: 'TEMPLE',
},
@@ -134,7 +142,7 @@ const env: Environment = {
},
dai: {
name: 'DAI',
- address: '0x33FA9618365F67c5345066d5Cfd7f3A2f183599A',
+ address: '0xBe9162230D9e637218D74C7f41f62ef2385fEe64',
decimals: 18,
symbol: 'DAI',
},
@@ -155,7 +163,6 @@ const env: Environment = {
// address: '0x5CE28cAE5aAb002DcBc076d5A551A473a7C9dF89',
// },
],
- enableSubgraphLogs: ENABLE_SUBGRAPH_LOGS,
};
export default env;
diff --git a/apps/dapp/src/constants/env/production.tsx b/apps/dapp/src/constants/env/production.tsx
index 5cc0534e0..8bd5f7cae 100644
--- a/apps/dapp/src/constants/env/production.tsx
+++ b/apps/dapp/src/constants/env/production.tsx
@@ -1,16 +1,13 @@
import { ADDRESS_ZERO } from 'utils/bigNumber';
import { Environment } from './types';
-const ENV_VARS = import.meta.env;
-const BALANCER_SUBGRAPH_API_KEY = ENV_VARS.VITE_BALANCER_SUBGRAPH_API_KEY;
-const ENABLE_SUBGRAPH_LOGS = ENV_VARS.VITE_ENABLE_SUBGRAPH_LOGS === 'true';
+const BALANCER_SUBGRAPH_API_KEY = import.meta.env
+ .VITE_BALANCER_SUBGRAPH_API_KEY;
const env: Environment = {
alchemyId: 'XiIZxWykHU5AOFBwxKgxseXWN984Mp8F',
rpcUrl: 'https://rpc.ankr.com/eth',
backendUrl: 'https://backend.templedao.link',
- tradeTokenListUrl:
- 'https://sf294otxgnbicood.public.blob.vercel-storage.com/prod-tokens-ycNgmUSdpPt1kIoael5y4t81s2jtZc.json',
contracts: {
balancerVault: '0xBA12222222228d8Ba445958a75a0704d566BF2C8',
exitQueue: '0xC6d556C34a179a224AEBE42e77c6e76594148B97',
@@ -168,6 +165,7 @@ const env: Environment = {
},
],
temple: '0x470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7',
+ templegold: '',
templeStaking: '0x4D14b24EDb751221B3Ff08BBB8bd91D4b1c8bc77',
templeV2FraxPair: '0x6021444f1706f15465bEe85463BCc7d7cC17Fc03',
templeV2Router: '0x98257C876ACe5009e7B97843F8c71b3AE795c71E',
@@ -193,6 +191,10 @@ const env: Environment = {
},
daiCircuitBreaker: '0x02607d6bc3146bb3d3022e991ef54f545988fb7b',
templeCircuitBreaker: '0x0745D453A19DfEAd0e5fd350a231D878F5c71b8D',
+ spiceBazaar: {
+ templeGoldStaking: '',
+ daiGoldAuction: '',
+ },
},
gas: {
swapFraxForTemple: 300000,
@@ -212,6 +214,11 @@ const env: Environment = {
ascendQuote: 10_000,
},
tokens: {
+ tgld: {
+ name: 'Temple Gold',
+ address: '',
+ decimals: 18,
+ },
frax: {
name: 'Frax',
address: '0x853d955acef822db058eb8505911ed77f175b99e',
@@ -305,7 +312,6 @@ const env: Environment = {
// address: '0x9f90430179D9b67341BFa50559bc7B8E35629f1b',
// },
],
- enableSubgraphLogs: ENABLE_SUBGRAPH_LOGS,
};
export default env;
diff --git a/apps/dapp/src/constants/env/types.ts b/apps/dapp/src/constants/env/types.ts
index ea8dc6eab..a32210469 100644
--- a/apps/dapp/src/constants/env/types.ts
+++ b/apps/dapp/src/constants/env/types.ts
@@ -34,6 +34,7 @@ interface Contracts {
otcOffer: string;
teamPayments?: { name: string; address: string }[];
temple: string;
+ templegold: string;
templeStaking: string;
templeV2FraxPair: string;
templeV2Router: string;
@@ -58,6 +59,12 @@ interface Contracts {
balancerHelpers: string;
daiCircuitBreaker: string;
templeCircuitBreaker: string;
+ spiceBazaar: SpiceBazaar;
+}
+
+interface SpiceBazaar {
+ templeGoldStaking: string;
+ daiGoldAuction: string;
}
interface Gas {
@@ -78,10 +85,10 @@ export interface Token {
address: string;
decimals: number;
symbol?: string;
- logoURI?: string;
}
export interface Tokens {
+ tgld: Token;
frax: Token;
temple: Token;
ogTemple: Token;
@@ -107,7 +114,6 @@ export interface Environment {
alchemyId: string;
rpcUrl: string;
backendUrl: string;
- tradeTokenListUrl: string;
contracts: Contracts;
gas?: Gas;
tokens: Tokens;
@@ -125,5 +131,4 @@ export interface Environment {
enableAscend: boolean;
};
safes: SafeWallet[];
- enableSubgraphLogs: boolean;
}
diff --git a/apps/dapp/src/enums/ticker-symbol.ts b/apps/dapp/src/enums/ticker-symbol.ts
index 481cce196..ec0fef1cc 100644
--- a/apps/dapp/src/enums/ticker-symbol.ts
+++ b/apps/dapp/src/enums/ticker-symbol.ts
@@ -2,6 +2,7 @@ export enum TICKER_SYMBOL {
STABLE_TOKEN = 'FRAX',
TEMPLE_TOKEN = 'TEMPLE',
OG_TEMPLE_TOKEN = 'OGTEMPLE',
+ TEMPLE_GOLD_TOKEN = 'TGLD',
FRAX = 'FRAX',
ETH = 'ETH',
USDC = 'USDC',
diff --git a/apps/dapp/src/hooks/spicebazaar/use-spice-bazaar.tsx b/apps/dapp/src/hooks/spicebazaar/use-spice-bazaar.tsx
new file mode 100644
index 000000000..a1ef6223b
--- /dev/null
+++ b/apps/dapp/src/hooks/spicebazaar/use-spice-bazaar.tsx
@@ -0,0 +1,363 @@
+import {
+ DaiGoldAuction__factory,
+ ERC20__factory,
+ TempleGoldStaking__factory,
+} from 'types/typechain';
+
+import { useWallet } from 'providers/WalletProvider';
+import env from 'constants/env';
+import { useCallback, useState } from 'react';
+import { fromAtto, ZERO } from 'utils/bigNumber';
+import { useNotification } from 'providers/NotificationProvider';
+import { estimateAndMine } from 'utils/ethers';
+import { getBigNumberFromString, getTokenInfo } from 'components/Vault/utils';
+import { TICKER_SYMBOL } from 'enums/ticker-symbol';
+import { BigNumber } from 'ethers';
+
+export type StakePageMetrics = {
+ stakedTemple: number;
+ totalEpochRewards: number;
+ yourStake: number;
+ yourRewards: number;
+};
+
+export type DaiGoldAuctionInfo = {
+ currentEpoch: number;
+ auctionLive: boolean;
+ totalAuctionTokenAmount: number;
+ auctionEndTime: number;
+ totalBidTokenAmount: number;
+ priceRatio: number;
+};
+
+export const useSpiceBazaar = () => {
+ const { wallet, signer, ensureAllowance, updateBalance } = useWallet();
+ const { openNotification } = useNotification();
+
+ const [stakePageMetricsLoading, setStakePageMetricsLoading] = useState(false);
+ const [stakePageMetrics, setStakePageMetrics] = useState({
+ stakedTemple: 0,
+ totalEpochRewards: 0,
+ yourStake: 0,
+ yourRewards: 0,
+ });
+
+ const [daiGoldAuctionInfoLoading, setDaiGoldAuctionInfoLoading] =
+ useState(false);
+ const [daiGoldAuctionInfo, setDaiGoldAuctionInfo] =
+ useState({
+ currentEpoch: 0,
+ auctionLive: false,
+ totalAuctionTokenAmount: 0,
+ auctionEndTime: 0,
+ totalBidTokenAmount: 0,
+ priceRatio: 0,
+ });
+
+ const getStakedTemple = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ try {
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const totalSupply = await templeGoldStaking.totalSupply();
+ return fromAtto(totalSupply);
+ } catch (err) {
+ console.error('Error while getting staked temple', {
+ cause: err,
+ });
+ return 0;
+ }
+ }, [wallet, signer]);
+
+ const getTotalEpochRewards = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ // TODO: Implement,
+ // rewardData.rewardRate * rewardDuration??
+ return 0;
+ }, [signer, wallet]);
+
+ const getYourStake = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ try {
+ const balance = await templeGoldStaking.balanceOf(wallet);
+ return fromAtto(balance);
+ } catch (err) {
+ console.error('Error while getting your stake', {
+ cause: err,
+ });
+ return 0;
+ }
+ }, [signer, wallet]);
+
+ const getYourRewards = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ try {
+ const reward = await templeGoldStaking.earned(wallet);
+ return fromAtto(reward);
+ } catch (err) {
+ console.error('Error while getting your rewards', {
+ cause: err,
+ });
+ return 0;
+ }
+ }, [signer, wallet]);
+
+ const fetchStakePageMetrics = useCallback(async (): Promise => {
+ console.log('--- updating stake page metrics');
+ setStakePageMetricsLoading(true);
+
+ const allMetrics = await Promise.all([
+ getStakedTemple(),
+ getTotalEpochRewards(),
+ getYourStake(),
+ getYourRewards(),
+ ]);
+
+ setStakePageMetrics({
+ stakedTemple: allMetrics[0] || 0,
+ totalEpochRewards: allMetrics[1] || 0,
+ yourStake: allMetrics[2] || 0,
+ yourRewards: allMetrics[3] || 0,
+ });
+
+ setStakePageMetricsLoading(false);
+ console.log('--- DONE updating stake page metrics');
+ }, [getStakedTemple, getTotalEpochRewards, getYourRewards, getYourStake]);
+
+ const stakeTemple = useCallback(
+ async (amount: string) => {
+ if (!wallet || !signer) {
+ console.debug(
+ 'Missing wallet or signer when trying to use SpiceBazaar.'
+ );
+ return;
+ }
+
+ try {
+ const templeAmount = getBigNumberFromString(
+ amount,
+ getTokenInfo(TICKER_SYMBOL.TEMPLE_TOKEN).decimals
+ );
+
+ const templeContract = new ERC20__factory(signer).attach(
+ env.contracts.temple
+ );
+
+ await ensureAllowance(
+ TICKER_SYMBOL.TEMPLE_TOKEN,
+ templeContract,
+ env.contracts.spiceBazaar.templeGoldStaking,
+ templeAmount
+ );
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const populatedTransaction =
+ await templeGoldStaking.populateTransaction.stake(templeAmount);
+ const receipt = await estimateAndMine(signer, populatedTransaction);
+
+ openNotification({
+ title: `Staked ${amount} TEMPLE`,
+ hash: receipt.transactionHash,
+ });
+
+ fetchStakePageMetrics();
+ updateBalance();
+ } catch (err) {
+ console.error(err);
+ openNotification({
+ title: 'Error staking TEMPLE',
+ hash: '',
+ });
+ }
+ },
+ [wallet, signer, ensureAllowance, openNotification, fetchStakePageMetrics]
+ );
+
+ const unstakeTemple = useCallback(
+ async (amount: string, claimRewards: boolean) => {
+ if (!wallet || !signer) {
+ console.debug(
+ 'Missing wallet or signer when trying to use SpiceBazaar.'
+ );
+ return;
+ }
+
+ const templeAmount = getBigNumberFromString(
+ amount,
+ getTokenInfo(TICKER_SYMBOL.TEMPLE_TOKEN).decimals
+ );
+
+ // TODO: Once on mainnet we need to ensure allowance
+ // await ensureAllowance(
+ // TICKER_SYMBOL.TEMPLE_TOKEN,
+ // env.contracts.spiceBazaar.tokens.temple, // I think that here should be the same obs like in stakeTemple
+ // env.contracts.spiceBazaar.templeGoldStaking,
+ // templeAmount
+ // );
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const populatedTransaction =
+ await templeGoldStaking.populateTransaction.withdraw(
+ templeAmount,
+ claimRewards
+ );
+ const receipt = await estimateAndMine(signer, populatedTransaction);
+
+ openNotification({
+ title: `Unstaked ${amount} TEMPLE`,
+ hash: receipt.transactionHash,
+ });
+
+ fetchStakePageMetrics();
+ },
+ [wallet, signer, openNotification, fetchStakePageMetrics]
+ );
+
+ const claimRewards = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const populatedTransaction =
+ await templeGoldStaking.populateTransaction.getReward(wallet);
+ const receipt = await estimateAndMine(signer, populatedTransaction);
+
+ openNotification({
+ title: `Claimed your TGLD`,
+ hash: receipt.transactionHash,
+ });
+
+ fetchStakePageMetrics();
+ }, [wallet, signer, openNotification, fetchStakePageMetrics]);
+
+ const getCurrentEpoch = useCallback(async () => {
+ if (!signer) {
+ console.debug('Missing signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const daiGoldAuction = new DaiGoldAuction__factory(signer).attach(
+ env.contracts.spiceBazaar.daiGoldAuction
+ );
+
+ return BigNumber.from(await daiGoldAuction.currentEpoch());
+ }, [signer]);
+
+ const getEpochInfo = useCallback(
+ async (epoch: number) => {
+ if (!signer) {
+ console.debug('Missing signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const daiGoldAuction = new DaiGoldAuction__factory(signer).attach(
+ env.contracts.spiceBazaar.daiGoldAuction
+ );
+
+ return await daiGoldAuction.getEpochInfo(epoch);
+ },
+ [signer]
+ );
+
+ const isAuctionLive = useCallback(async () => {
+ if (!signer) {
+ console.debug('Missing signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const daiGoldAuction = new DaiGoldAuction__factory(signer).attach(
+ env.contracts.spiceBazaar.daiGoldAuction
+ );
+
+ return await daiGoldAuction.canDeposit();
+ }, [signer]);
+
+ const fetchDaiGoldAuctionInfo = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ setDaiGoldAuctionInfoLoading(true);
+
+ const currentEpoch = await getCurrentEpoch();
+ const epochInfo = await getEpochInfo(Number(currentEpoch));
+ const auctionLive = await isAuctionLive();
+
+ if (!epochInfo) {
+ setDaiGoldAuctionInfoLoading(false);
+ return;
+ }
+
+ setDaiGoldAuctionInfo({
+ currentEpoch: Number(currentEpoch),
+ auctionLive: auctionLive || false,
+ totalAuctionTokenAmount: fromAtto(epochInfo.totalAuctionTokenAmount),
+ auctionEndTime: new Date(epochInfo.endTime.toNumber() * 1000).getTime(),
+ totalBidTokenAmount: fromAtto(epochInfo.totalBidTokenAmount),
+ priceRatio: fromAtto(
+ epochInfo.totalBidTokenAmount.div(epochInfo.totalAuctionTokenAmount)
+ ),
+ });
+
+ setDaiGoldAuctionInfoLoading(false);
+ }, [wallet, signer, getCurrentEpoch, getEpochInfo, isAuctionLive]);
+
+ return {
+ stakePageMetrics: {
+ data: stakePageMetrics,
+ loading: stakePageMetricsLoading,
+ fetch: fetchStakePageMetrics,
+ },
+ staking: {
+ stakeTemple,
+ unstakeTemple,
+ claimRewards,
+ },
+ daiGoldAuctionInfo: {
+ data: daiGoldAuctionInfo,
+ loading: daiGoldAuctionInfoLoading,
+ fetch: fetchDaiGoldAuctionInfo,
+ },
+ daiGoldAuctions: {
+ bid: async () => ({}),
+ },
+ };
+};
diff --git a/apps/dapp/src/hooks/spicebazaar/use-unstake-time.tsx b/apps/dapp/src/hooks/spicebazaar/use-unstake-time.tsx
new file mode 100644
index 000000000..b4d2c15cc
--- /dev/null
+++ b/apps/dapp/src/hooks/spicebazaar/use-unstake-time.tsx
@@ -0,0 +1,87 @@
+import { useState, useEffect } from 'react';
+import { useSpiceBazaar } from 'providers/SpiceBazaarProvider';
+
+type TimeRemaining = {
+ days: number;
+ hours: number;
+ minutes: number;
+ seconds: number;
+};
+
+export const useUnstakeTime = () => {
+ const [isLoading, setIsLoading] = useState(true);
+ const [unstakeTimeRemaining, setUnstakeTimeRemaining] = useState<
+ number | null
+ >(null);
+ const [countdown, setCountdown] = useState(null);
+
+ const {
+ staking: { getUnstakeTime },
+ } = useSpiceBazaar();
+
+ // Fetch unstake time on mount
+ useEffect(() => {
+ const fetchUnstakeTime = async () => {
+ setIsLoading(true);
+ try {
+ const time = await getUnstakeTime();
+ setUnstakeTimeRemaining(time);
+ } finally {
+ setIsLoading(false);
+ }
+ };
+ fetchUnstakeTime();
+ }, [getUnstakeTime]);
+
+ // Update countdown every second, but only if we have a valid unstakeTimeRemaining
+ useEffect(() => {
+ if (unstakeTimeRemaining === null) return;
+
+ const now = Math.floor(Date.now() / 1000);
+ const diff = unstakeTimeRemaining - now;
+
+ // If no time remaining, clear countdown and don't start interval
+ if (diff <= 0) {
+ setCountdown(null);
+ return;
+ }
+
+ // Set initial countdown value
+ const updateCountdown = () => {
+ const now = Math.floor(Date.now() / 1000);
+ const diff = unstakeTimeRemaining - now;
+
+ if (diff <= 0) {
+ setCountdown(null);
+ return false; // Return false to clear interval
+ }
+
+ const days = Math.floor(diff / (24 * 60 * 60));
+ const hours = Math.floor((diff % (24 * 60 * 60)) / (60 * 60));
+ const minutes = Math.floor((diff % (60 * 60)) / 60);
+ const seconds = diff % 60;
+
+ setCountdown({ days, hours, minutes, seconds });
+ return true; // Return true to keep interval
+ };
+
+ // Set initial value
+ updateCountdown();
+
+ // Start interval
+ const timer = setInterval(() => {
+ const shouldContinue = updateCountdown();
+ if (!shouldContinue) clearInterval(timer);
+ }, 1000);
+
+ return () => clearInterval(timer);
+ }, [unstakeTimeRemaining]);
+
+ const shouldShowCountdown = !isLoading && countdown !== null;
+
+ return {
+ isLoading,
+ countdown,
+ shouldShowCountdown,
+ };
+};
diff --git a/apps/dapp/src/main.tsx b/apps/dapp/src/main.tsx
index 2c57bac46..6a058788b 100644
--- a/apps/dapp/src/main.tsx
+++ b/apps/dapp/src/main.tsx
@@ -17,6 +17,20 @@ import { TradePage } from './components/Pages/Core/DappPages/TradePage';
import { BorrowPage } from 'components/Pages/Core/DappPages/Borrow';
import { LegacyPage } from 'components/Pages/Core/DappPages/LegacyPage';
import V2Layout from 'components/Layouts/V2Layout';
+import { OhmagePage } from 'components/Pages/Core/DappPages/OhmagePage';
+import { SpiceBazaarPage } from 'components/Pages/Core/DappPages/SpiceBazaar/index';
+import { SpiceBazaarTopNav } from 'components/Pages/Core/DappPages/SpiceBazaar/TopNav';
+import { Earn } from 'components/Pages/Core/DappPages/SpiceBazaar/Earn';
+import { StakeTemple } from 'components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple';
+import { Stake } from 'components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Stake';
+import { Unstake } from 'components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Unstake';
+import { Claim } from 'components/Pages/Core/DappPages/SpiceBazaar/Earn/StakeTemple/Claim';
+import { Auctions } from 'components/Pages/Core/DappPages/SpiceBazaar/Earn/Auctions';
+import { Bid } from 'components/Pages/Core/DappPages/SpiceBazaar/BidTGLD';
+import { MyActivityTGLD } from 'components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForTGLD';
+import { Analytics } from 'components/Pages/Core/DappPages/SpiceBazaar/Analytics';
+import { Details } from 'components/Pages/Core/DappPages/SpiceBazaar/BidTGLD/Details/Details';
+import { MyActivitySpice } from 'components/Pages/Core/DappPages/SpiceBazaar/MyActivity/BidsForSpice';
// Separate Chunks
const TeamPayments = React.lazy(() => import('components/Pages/TeamPayments'));
@@ -79,7 +93,29 @@ root.render(
} />
} />
} />
+ } />
} />
+ } />
+ }>
+ } />
+ }>
+ } />
+ } />
+ } />
+
+ } />
+ } />
+ } />
+ }
+ />
+ }
+ />
+ } />
+
>
diff --git a/apps/dapp/src/providers/AppProvider.tsx b/apps/dapp/src/providers/AppProvider.tsx
index ca9c48c69..8963e6b4c 100644
--- a/apps/dapp/src/providers/AppProvider.tsx
+++ b/apps/dapp/src/providers/AppProvider.tsx
@@ -12,6 +12,7 @@ import { Web3OnboardInitProvider } from 'components/Web3OnboardInitProvider';
import { WrongNetworkPopover } from 'components/Layouts/CoreLayout/WrongNetworkPopover';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
+import { SpiceBazaarProvider } from './SpiceBazaarProvider';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface AppProviderState {}
@@ -36,7 +37,9 @@ export const AppProvider = (props: PropsWithChildren<{}>) => {
- {props.children}
+
+ {props.children}
+
diff --git a/apps/dapp/src/providers/SpiceBazaarProvider.tsx b/apps/dapp/src/providers/SpiceBazaarProvider.tsx
new file mode 100644
index 000000000..2dc86b880
--- /dev/null
+++ b/apps/dapp/src/providers/SpiceBazaarProvider.tsx
@@ -0,0 +1,530 @@
+import {
+ createContext,
+ useContext,
+ useState,
+ PropsWithChildren,
+ useCallback,
+ useMemo,
+} from 'react';
+import {
+ DaiGoldAuction__factory,
+ TempleGoldStaking__factory,
+ ERC20__factory,
+} from 'types/typechain';
+import { useWallet } from 'providers/WalletProvider';
+import env from 'constants/env';
+import { fromAtto } from 'utils/bigNumber';
+import { useNotification } from 'providers/NotificationProvider';
+import { estimateAndMine } from 'utils/ethers';
+import { getBigNumberFromString, getTokenInfo } from 'components/Vault/utils';
+import { TICKER_SYMBOL } from 'enums/ticker-symbol';
+import { BigNumber } from 'ethers';
+import { asyncNoop } from 'utils/helpers';
+
+export type StakePageMetrics = {
+ stakedTemple: number;
+ totalEpochRewards: number;
+ yourStake: number;
+ yourRewards: number;
+};
+
+export type DaiGoldAuctionInfo = {
+ currentEpoch: number;
+ auctionLive: boolean;
+ totalAuctionTokenAmount: number;
+ auctionEndTime: number;
+ totalBidTokenAmount: number;
+ priceRatio: number;
+};
+
+interface SpiceBazaarContextValue {
+ stakePageMetrics: {
+ data: StakePageMetrics;
+ loading: boolean;
+ fetch: () => Promise;
+ };
+ staking: {
+ stakeTemple: (amount: string) => Promise;
+ unstakeTemple: (amount: string, claimRewards: boolean) => Promise;
+ claimRewards: () => Promise;
+ getUnstakeTime: () => Promise;
+ };
+ daiGoldAuctionInfo: {
+ data: DaiGoldAuctionInfo;
+ loading: boolean;
+ fetch: () => Promise;
+ };
+ daiGoldAuctions: {
+ bid: (amount: string) => Promise;
+ };
+}
+
+const INITIAL_STATE: SpiceBazaarContextValue = {
+ stakePageMetrics: {
+ data: {
+ stakedTemple: 0,
+ totalEpochRewards: 0,
+ yourStake: 0,
+ yourRewards: 0,
+ },
+ loading: false,
+ fetch: asyncNoop,
+ },
+ staking: {
+ stakeTemple: asyncNoop,
+ unstakeTemple: asyncNoop,
+ claimRewards: asyncNoop,
+ getUnstakeTime: async () => 0,
+ },
+ daiGoldAuctionInfo: {
+ data: {
+ currentEpoch: 0,
+ auctionLive: false,
+ totalAuctionTokenAmount: 0,
+ auctionEndTime: 0,
+ totalBidTokenAmount: 0,
+ priceRatio: 0,
+ },
+ loading: false,
+ fetch: asyncNoop,
+ },
+ daiGoldAuctions: {
+ bid: asyncNoop,
+ },
+};
+
+const SpiceBazaarContext =
+ createContext(INITIAL_STATE);
+
+export const SpiceBazaarProvider = ({ children }: PropsWithChildren) => {
+ const { wallet, signer, ensureAllowance, updateBalance } = useWallet();
+ const { openNotification } = useNotification();
+
+ const [stakePageMetricsLoading, setStakePageMetricsLoading] = useState(false);
+ const [stakePageMetrics, setStakePageMetrics] = useState(
+ INITIAL_STATE.stakePageMetrics.data
+ );
+
+ const [daiGoldAuctionInfoLoading, setDaiGoldAuctionInfoLoading] =
+ useState(false);
+ const [daiGoldAuctionInfo, setDaiGoldAuctionInfo] =
+ useState(INITIAL_STATE.daiGoldAuctionInfo.data);
+
+ const getStakedTemple = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ try {
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const totalSupply = await templeGoldStaking.totalSupply();
+ return fromAtto(totalSupply);
+ } catch (err) {
+ console.error('Error while getting staked temple', {
+ cause: err,
+ });
+ return 0;
+ }
+ }, [wallet, signer]);
+
+ const getTotalEpochRewards = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+ // TODO: Implement
+ return 0;
+ }, [wallet, signer]);
+
+ const getYourStake = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ try {
+ const balance = await templeGoldStaking.balanceOf(wallet);
+ return fromAtto(balance);
+ } catch (err) {
+ console.error('Error while getting your stake', {
+ cause: err,
+ });
+ return 0;
+ }
+ }, [wallet, signer]);
+
+ const getYourRewards = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ try {
+ const reward = await templeGoldStaking.earned(wallet);
+ return fromAtto(reward);
+ } catch (err) {
+ console.error('Error while getting your rewards', {
+ cause: err,
+ });
+ return 0;
+ }
+ }, [wallet, signer]);
+
+ const fetchStakePageMetrics = useCallback(async () => {
+ setStakePageMetricsLoading(true);
+
+ const allMetrics = await Promise.all([
+ getStakedTemple(),
+ getTotalEpochRewards(),
+ getYourStake(),
+ getYourRewards(),
+ ]);
+
+ setStakePageMetrics({
+ stakedTemple: allMetrics[0] || 0,
+ totalEpochRewards: allMetrics[1] || 0,
+ yourStake: allMetrics[2] || 0,
+ yourRewards: allMetrics[3] || 0,
+ });
+
+ setStakePageMetricsLoading(false);
+ }, [getStakedTemple, getTotalEpochRewards, getYourStake, getYourRewards]);
+
+ const stakeTemple = useCallback(
+ async (amount: string) => {
+ if (!wallet || !signer) {
+ console.debug(
+ 'Missing wallet or signer when trying to use SpiceBazaar.'
+ );
+ return;
+ }
+
+ try {
+ const templeAmount = getBigNumberFromString(
+ amount,
+ getTokenInfo(TICKER_SYMBOL.TEMPLE_TOKEN).decimals
+ );
+
+ const templeContract = new ERC20__factory(signer).attach(
+ env.contracts.temple
+ );
+
+ await ensureAllowance(
+ TICKER_SYMBOL.TEMPLE_TOKEN,
+ templeContract,
+ env.contracts.spiceBazaar.templeGoldStaking,
+ templeAmount,
+ true
+ );
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const populatedTransaction =
+ await templeGoldStaking.populateTransaction.stake(templeAmount);
+
+ const receipt = await estimateAndMine(signer, populatedTransaction);
+
+ openNotification({
+ title: `Staked ${amount} TEMPLE`,
+ hash: receipt.transactionHash,
+ });
+
+ fetchStakePageMetrics();
+ updateBalance();
+ } catch (err) {
+ console.error(err);
+ openNotification({
+ title: 'Error staking TEMPLE',
+ hash: '',
+ });
+ }
+ },
+ [
+ wallet,
+ signer,
+ ensureAllowance,
+ openNotification,
+ fetchStakePageMetrics,
+ updateBalance,
+ ]
+ );
+
+ const unstakeTemple = useCallback(
+ async (amount: string, claimRewards: boolean) => {
+ if (!wallet || !signer) {
+ console.debug(
+ 'Missing wallet or signer when trying to use SpiceBazaar.'
+ );
+ return;
+ }
+
+ const templeAmount = getBigNumberFromString(
+ amount,
+ getTokenInfo(TICKER_SYMBOL.TEMPLE_TOKEN).decimals
+ );
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const populatedTransaction =
+ await templeGoldStaking.populateTransaction.withdraw(
+ templeAmount,
+ claimRewards
+ );
+ const receipt = await estimateAndMine(signer, populatedTransaction);
+
+ openNotification({
+ title: `Unstaked ${amount} TEMPLE`,
+ hash: receipt.transactionHash,
+ });
+
+ fetchStakePageMetrics();
+ },
+ [wallet, signer, openNotification, fetchStakePageMetrics]
+ );
+
+ const claimRewards = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const populatedTransaction =
+ await templeGoldStaking.populateTransaction.getReward(wallet);
+ const receipt = await estimateAndMine(signer, populatedTransaction);
+
+ openNotification({
+ title: `Claimed your TGLD`,
+ hash: receipt.transactionHash,
+ });
+
+ fetchStakePageMetrics();
+ }, [wallet, signer, openNotification, fetchStakePageMetrics]);
+
+ const getCurrentEpoch = useCallback(async () => {
+ if (!signer) {
+ console.debug('Missing signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const daiGoldAuction = new DaiGoldAuction__factory(signer).attach(
+ env.contracts.spiceBazaar.daiGoldAuction
+ );
+
+ return BigNumber.from(await daiGoldAuction.currentEpoch());
+ }, [signer]);
+
+ const getEpochInfo = useCallback(
+ async (epoch: number) => {
+ if (!signer) {
+ console.debug('Missing signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const daiGoldAuction = new DaiGoldAuction__factory(signer).attach(
+ env.contracts.spiceBazaar.daiGoldAuction
+ );
+
+ return await daiGoldAuction.getEpochInfo(epoch);
+ },
+ [signer]
+ );
+
+ // TODO: possibly move to useMemo
+ const isAuctionLive = useCallback(async () => {
+ if (!signer) {
+ console.debug('Missing signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ const daiGoldAuction = new DaiGoldAuction__factory(signer).attach(
+ env.contracts.spiceBazaar.daiGoldAuction
+ );
+
+ return await daiGoldAuction.canDeposit();
+ }, [signer]);
+
+ const fetchDaiGoldAuctionInfo = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return;
+ }
+
+ setDaiGoldAuctionInfoLoading(true);
+
+ const currentEpoch = await getCurrentEpoch();
+ const epochInfo = await getEpochInfo(Number(currentEpoch));
+ const auctionLive = await isAuctionLive();
+
+ if (!epochInfo) {
+ setDaiGoldAuctionInfoLoading(false);
+ return;
+ }
+
+ const totalBidTokenAmountNumber = fromAtto(epochInfo.totalBidTokenAmount);
+ const totalAuctionTokenAmountNumber = fromAtto(
+ epochInfo.totalAuctionTokenAmount
+ );
+
+ const priceRatio =
+ totalBidTokenAmountNumber / totalAuctionTokenAmountNumber;
+
+ setDaiGoldAuctionInfo({
+ currentEpoch: Number(currentEpoch),
+ auctionLive: auctionLive || false,
+ totalAuctionTokenAmount: fromAtto(epochInfo.totalAuctionTokenAmount),
+ auctionEndTime: new Date(epochInfo.endTime.toNumber() * 1000).getTime(),
+ totalBidTokenAmount: fromAtto(epochInfo.totalBidTokenAmount),
+ priceRatio: priceRatio,
+ });
+
+ setDaiGoldAuctionInfoLoading(false);
+ }, [getCurrentEpoch, getEpochInfo, isAuctionLive, signer, wallet]);
+
+ const getUnstakeTime = useCallback(async () => {
+ if (!wallet || !signer) {
+ console.debug('Missing wallet or signer when trying to use SpiceBazaar.');
+ return 0;
+ }
+
+ try {
+ const templeGoldStaking = new TempleGoldStaking__factory(signer).attach(
+ env.contracts.spiceBazaar.templeGoldStaking
+ );
+
+ const unstakeTime = await templeGoldStaking.getAccountUnstakeTime(wallet);
+ return unstakeTime.toNumber();
+ } catch (err) {
+ console.error('Error while getting unstake time', {
+ cause: err,
+ });
+ return 0;
+ }
+ }, [wallet, signer]);
+
+ const daiGoldAuctionBid = useCallback(
+ async (amount: string) => {
+ if (!wallet || !signer) {
+ console.debug(
+ 'Missing wallet or signer when trying to use SpiceBazaar.'
+ );
+ return;
+ }
+
+ try {
+ const daiAmount = getBigNumberFromString(
+ amount,
+ getTokenInfo(TICKER_SYMBOL.DAI).decimals
+ );
+
+ const daiContract = new ERC20__factory(signer).attach(
+ env.contracts.dai
+ );
+
+ await ensureAllowance(
+ TICKER_SYMBOL.DAI,
+ daiContract,
+ env.contracts.spiceBazaar.daiGoldAuction,
+ daiAmount,
+ true
+ );
+
+ const daiGoldAuction = new DaiGoldAuction__factory(signer).attach(
+ env.contracts.spiceBazaar.daiGoldAuction
+ );
+
+ const populatedTransaction =
+ await daiGoldAuction.populateTransaction.bid(daiAmount);
+ const receipt = await estimateAndMine(signer, populatedTransaction);
+
+ openNotification({
+ title: `Bid ${amount} DAI`,
+ hash: receipt.transactionHash,
+ });
+
+ fetchDaiGoldAuctionInfo();
+ updateBalance();
+ } catch (err) {
+ console.error('Error while bidding DAI', {
+ cause: err,
+ });
+ openNotification({
+ title: 'Error bidding DAI',
+ hash: '',
+ });
+ }
+ },
+ [
+ wallet,
+ signer,
+ ensureAllowance,
+ openNotification,
+ fetchDaiGoldAuctionInfo,
+ updateBalance,
+ ]
+ );
+
+ const value = useMemo(
+ () => ({
+ stakePageMetrics: {
+ data: stakePageMetrics,
+ loading: stakePageMetricsLoading,
+ fetch: fetchStakePageMetrics,
+ },
+ staking: {
+ stakeTemple,
+ unstakeTemple,
+ claimRewards,
+ getUnstakeTime,
+ },
+ daiGoldAuctionInfo: {
+ data: daiGoldAuctionInfo,
+ loading: daiGoldAuctionInfoLoading,
+ fetch: fetchDaiGoldAuctionInfo,
+ },
+ daiGoldAuctions: {
+ bid: daiGoldAuctionBid,
+ },
+ }),
+ [
+ stakePageMetrics,
+ stakePageMetricsLoading,
+ fetchStakePageMetrics,
+ stakeTemple,
+ unstakeTemple,
+ claimRewards,
+ getUnstakeTime,
+ daiGoldAuctionInfo,
+ daiGoldAuctionInfoLoading,
+ fetchDaiGoldAuctionInfo,
+ daiGoldAuctionBid,
+ ]
+ );
+
+ return (
+
+ {children}
+
+ );
+};
+
+export const useSpiceBazaar = () => useContext(SpiceBazaarContext);
diff --git a/apps/dapp/src/providers/WalletProvider.tsx b/apps/dapp/src/providers/WalletProvider.tsx
index bcfa32aaa..4301a22a6 100644
--- a/apps/dapp/src/providers/WalletProvider.tsx
+++ b/apps/dapp/src/providers/WalletProvider.tsx
@@ -42,6 +42,7 @@ const INITIAL_STATE: WalletState = {
TEMPLE: ZERO,
OGTEMPLE: ZERO,
OHM: ZERO,
+ TGLD: ZERO,
},
wallet: undefined,
walletAddress: undefined,
@@ -52,7 +53,6 @@ const INITIAL_STATE: WalletState = {
updateBalance: asyncNoop,
collectTempleTeamPayment: asyncNoop,
ensureAllowance: asyncNoop,
- ethersProvider: null,
};
const WalletContext = createContext(INITIAL_STATE);
@@ -63,13 +63,10 @@ export const WalletProvider = (props: PropsWithChildren