PageSourceSearch

https://www.evvm.info/assets/js/451a5922.29a8f819.js

js evvm.info collected 2026-10-05 08:30:24 UTC 41,956 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkdocumentation=globalThis.webpackChunkdocumentation||[]).push([[3626],{2095:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>d,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"Contracts/EVVM/Getters","title":"Getter Functions","description":"Comprehensive documentation of all getter functions available in the EVVM Core Contract for retrieving system state and configuration.","source":"@site/docs/04-Contracts/01-EVVM/05-Getters.md","sourceDirName":"04-Contracts/01-EVVM","slug":"/Contracts/EVVM/Getters","permalink":"/docs/Contracts/EVVM/Getters","draft":false,"unlisted":false,"editUrl":"https://github.com/EVVM-org/documentation-website/tree/main/docs/04-Contracts/01-EVVM/05-Getters.md","tags":[],"version":"current","sidebarPosition":5,"frontMatter":{"title":"Getter Functions","description":"Comprehensive documentation of all getter functions available in the EVVM Core Contract for retrieving system state and configuration.","sidebar_position":5},"sidebar":"docsSidebar","previous":{"title":"disperseCaPay Function","permalink":"/docs/Contracts/EVVM/PaymentFunctions/disperseCaPay"},"next":{"title":"Administrative Functions","permalink":"/docs/Contracts/EVVM/AdminFunctions"}}');var t=r(4848),i=r(8453);const d={title:"Getter Functions",description:"Comprehensive documentation of all getter functions available in the EVVM Core Contract for retrieving system state and configuration.",sidebar_position:5},c="Getter Functions",l={},a=[{value:"System Configuration Functions",id:"system-configuration-functions",level:2},{value:"getEvvmMetadata",id:"getevvmmetadata",level:3},{value:"Return Value",id:"return-value",level:4},{value:"getEvvmID",id:"getevvmid",level:3},{value:"Return Value",id:"return-value-1",level:4},{value:"getNameServiceAddress",id:"getnameserviceaddress",level:3},{value:"Return Value",id:"return-value-2",level:4},{value:"getStakingContractAddress",id:"getstakingcontractaddress",level:3},{value:"Return Value",id:"return-value-3",level:4},{value:"Nonce Management Functions",id:"nonce-management-functions",level:2},{value:"getNextCurrentSyncNonce",id:"getnextcurrentsyncnonce",level:3},{value:"Input Parameters",id:"input-parameters",level:4},{value:"Return Value",id:"return-value-4",level:4},{value:"getIfUsedAsyncNonce",id:"getifusedasyncnonce",level:3},{value:"Input Parameters",id:"input-parameters-1",level:4},{value:"Return Value",id:"return-value-5",level:4},{value:"getAsyncNonceReservation",id:"getasyncnoncereservation",level:3},{value:"Input Parameters",id:"input-parameters-2",level:4},{value:"Return Value",id:"return-value-6",level:4},{value:"Example",id:"example",level:4},{value:"asyncNonceStatus",id:"asyncnoncestatus",level:3},{value:"Input Parameters",id:"input-parameters-3",level:4},{value:"Return Value",id:"return-value-7",level:4},{value:"Status Codes",id:"status-codes",level:4},{value:"Example",id:"example-1",level:4},{value:"getUserValidatorAddress",id:"getuservalidatoraddress",level:3},{value:"Return Value",id:"return-value-8",level:4},{value:"Example",id:"example-2",level:4},{value:"User Validation Functions",id:"user-validation-functions",level:2},{value:"canExecuteUserTransaction",id:"canexecuteusertransaction",level:3},{value:"Input Parameters",id:"input-parameters-4",level:4},{value:"Return Value",id:"return-value-9",level:4},{value:"Behavior",id:"behavior",level:4},{value:"Integration",id:"integration",level:4},{value:"Example",id:"example-3",level:4},{value:"Related Functions",id:"related-functions",level:4},{value:"Balance and Staking Functions",id:"balance-and-staking-functions",level:2},{value:"getBalance",id:"getbalance",level:3},{value:"Input Parameters",id:"input-parameters-5",level:4},{value:"Return Value",id:"return-value-10",level:4},{value:"isAddressStaker",id:"isaddressstaker",level:3},{value:"Input Parameters",id:"input-parameters-6",level:4},{value:"Return Value",id:"return-value-11",level:4},{value:"Economic System Functions",id:"economic-system-functions",level:2},{value:"getRewardAmount",id:"getrewardamount",level:3},{value:"Return Value",id:"return-value-12",level:4},{value:"getPrincipalTokenTotalSupply",id:"getprincipaltokentotalsupply",level:3},{value:"Return Value",id:"return-value-13",level:4},{value:"Proxy and Governance Functions",id:"proxy-and-governance-functions",level:2},{value:"getCurrentImplementation",id:"getcurrentimplementation",level:3},{value:"Return Value",id:"return-value-14",level:4},{value:"getFullDetailImplementation",id:"getfulldetailimplementation",level:3},{value:"Return Value",id:"return-value-15",level:4},{value:"getTimeToAcceptImplementation",id:"gettimetoacceptimplementation",level:3},{value:"Return Value",id:"return-value-16",level:4},{value:"Administrative Functions",id:"administrative-functions",level:2},{value:"getCurrentAdmin",id:"getcurrentadmin",level:3},{value:"Return Value",id:"return-value-17",level:4},{value:"getFullDetailAdmin",id:"getfulldetailadmin",level:3},{value:"Return Value",id:"return-value-18",level:4},{value:"UserValidator Functions",id:"uservalidator-functions",level:2},{value:"getUserValidatorAddress",id:"getuservalidatoraddress",level:3},{value:"Return Value",id:"return-value-19",level:4},{value:"getFullDetailUserValidator",id:"getfulldetailuservalidator",level:3},{value:"Return Value",id:"return-value-20",level:4},{value:"Example",id:"example-4",level:4},{value:"Usage Examples",id:"usage-examples",level:2},{value:"Checking User Balance",id:"checking-user-balance",level:3},{value:"Nonce Management",id:"nonce-management",level:3}];function o(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"getter-functions",children:"Getter Functions"})}),"\n",(0,t.jsx)(n.p,{children:"This section details all available getter functions in the EVVM contract, providing comprehensive information about the contract's state, configuration, and user data."}),"\n",(0,t.jsx)(n.h2,{id:"system-configuration-functions",children:"System Configuration Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getevvmmetadata",children:"getEvvmMetadata"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getEvvmMetadata()"})]}),"\n",(0,t.jsx)(n.p,{children:"Returns the complete EVVM metadata configuration containing system-wide parameters and economic settings."}),"\n",(0,t.jsx)(n.h4,{id:"return-value",children:"Return Value"}),"\n",(0,t.jsxs)(n.p,{children:["Returns an ",(0,t.jsx)(n.code,{children:"EvvmMetadata"})," struct containing:"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"principalTokenAddress"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address of the principal token (MATE token)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"reward"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Current reward amount per transaction"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"totalSupply"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Total supply tracking for era transitions"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"eraTokens"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Era tokens threshold for reward transitions"})]})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getevvmid",children:"getEvvmID"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getEvvmID()"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets the unique identifier for this EVVM instance used for signature verification and distinguishing between different EVVM deployments."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-1",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Unique identifier for this EVVM instance"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getnameserviceaddress",children:"getNameServiceAddress"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getNameServiceAddress()"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets the current NameService contract address used for identity resolution in payments."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-2",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address of the integrated NameService contract"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getstakingcontractaddress",children:"getStakingContractAddress"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getStakingContractAddress()"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets the authorized staking contract address that can modify staker status and receive rewards."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-3",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address of the integrated staking contract"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"nonce-management-functions",children:"Nonce Management Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getnextcurrentsyncnonce",children:"getNextCurrentSyncNonce"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getNextCurrentSyncNonce(address)"})]}),"\n",(0,t.jsx)(n.p,{children:"Returns the expected nonce for the next synchronous payment transaction for a specific user."}),"\n",(0,t.jsx)(n.h4,{id:"input-parameters",children:"Input Parameters"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"user"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}
1),(0,t.jsx)(n.td,{children:"Address to check sync nonce for"})]})})]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-4",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Next synchronous nonce value"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getifusedasyncnonce",children:"getIfUsedAsyncNonce"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getIfUsedAsyncNonce(address,uint256)"})]}),"\n",(0,t.jsx)(n.p,{children:"Checks if a specific asynchronous nonce has been used by a user to prevent replay attacks."}),"\n",(0,t.jsx)(n.h4,{id:"input-parameters-1",children:"Input Parameters"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"user"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address to check nonce usage for"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"nonce"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Specific nonce value to verify"})]})]})]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-5",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"bool"})}),(0,t.jsx)(n.td,{children:"True if the nonce has been used, false if available"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getasyncnoncereservation",children:"getAsyncNonceReservation"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getAsyncNonceReservation(address,uint256)"})]}),"\n",(0,t.jsxs)(n.p,{children:["Gets the service address that has reserved a specific async nonce for a user. Returns ",(0,t.jsx)(n.code,{children:"address(0)"})," if the nonce is not reserved."]}),"\n",(0,t.jsx)(n.h4,{id:"input-parameters-2",children:"Input Parameters"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"user"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address of the user who owns the nonce"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"nonce"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Async nonce to check reservation for"})]})]})]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-6",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsxs)(n.td,{children:["Service address that reserved the nonce, or ",(0,t.jsx)(n.code,{children:"address(0)"})," if not reserved"]})]})})]}),"\n",(0,t.jsx)(n.h4,{id:"example",children:"Example"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-solidity",children:"// Check if nonce 100 is reserved for a user\naddress reservedService = core.getAsyncNonceReservation(userAddress, 100);\n\nif (reservedService == address(0)) {\n    // Nonce is not reserved, any service can use it\n} else if (reservedService == nameServiceAddress) {\n    // Nonce is reserved for NameService\n} else {\n    // Nonce is reserved for another service\n}\n"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"asyncnoncestatus",children:"asyncNonceStatus"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"asyncNonceStatus(address,uint256)"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets comprehensive status of an async nonce, indicating whether it's available, used, or reserved."}),"\n",(0,t.jsx)(n.h4,{id:"input-parameters-3",children:"Input Parameters"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"user"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address of the user who owns the nonce"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"nonce"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}
1),(0,t.jsx)(n.td,{children:"Async nonce to check status for"})]})]})]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-7",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"bytes1"})}),(0,t.jsxs)(n.td,{children:["Status code: ",(0,t.jsx)(n.code,{children:"0x00"})," (available), ",(0,t.jsx)(n.code,{children:"0x01"})," (used), ",(0,t.jsx)(n.code,{children:"0x02"})," (reserved)"]})]})})]}),"\n",(0,t.jsx)(n.h4,{id:"status-codes",children:"Status Codes"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:[(0,t.jsx)(n.code,{children:"0x00"})," (Available)"]}),": Nonce can be used by any service"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:[(0,t.jsx)(n.code,{children:"0x01"})," (Used)"]}),": Nonce has been consumed and cannot be reused"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsxs)(n.strong,{children:[(0,t.jsx)(n.code,{children:"0x02"})," (Reserved)"]}),": Nonce is reserved for a specific service"]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"example-1",children:"Example"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-solidity",children:"// Check status of nonce 200\nbytes1 status = core.asyncNonceStatus(userAddress, 200);\n\nif (status == 0x00) {\n    // Nonce is available\n} else if (status == 0x01) {\n    // Nonce has been used\n} else if (status == 0x02) {\n    // Nonce is reserved for a specific service\n    address reservedFor = core.getAsyncNonceReservation(userAddress, 200);\n}\n"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getuservalidatoraddress",children:"getUserValidatorAddress"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getUserValidatorAddress()"})]}),"\n",(0,t.jsxs)(n.p,{children:["Gets the current UserValidator contract address used for transaction filtering. Returns ",(0,t.jsx)(n.code,{children:"address(0)"})," if no validator is configured (all users allowed)."]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-8",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsxs)(n.td,{children:["Address of the active UserValidator contract, or ",(0,t.jsx)(n.code,{children:"address(0)"})," if none"]})]})})]}),"\n",(0,t.jsx)(n.h4,{id:"example-2",children:"Example"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-solidity",children:"address validator = core.getUserValidatorAddress();\n\nif (validator == address(0)) {\n    // No validator configured - all users can execute transactions\n} else {\n    // Validator is active - check if user can execute\n    bool canExecute = IUserValidator(validator).canExecute(userAddress);\n}\n"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"user-validation-functions",children:"User Validation Functions"}),"\n",(0,t.jsx)(n.h3,{id:"canexecuteusertransaction",children:"canExecuteUserTransaction"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"})," (public)",(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"canExecuteUserTransaction(address)"})]}),"\n",(0,t.jsx)(n.p,{children:"Validates if a user is allowed to execute transactions in the EVVM ecosystem. This function is publicly accessible, allowing external services to check user permissions before processing transactions."}),"\n",(0,t.jsx)(n.h4,{id:"input-parameters-4",children:"Input Parameters"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"user"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address to check execution permission"})]})})]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-9",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"bool"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.code,{children:"true"})," if user can execute, ",(0,t.jsx)(n.code,{children:"false"})," if blocked"]})]})})]}),"\n",(0,t.jsx)(n.h4,{id:"behavior",children:"Behavior"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"No Validator 
1Configured"}),": Returns ",(0,t.jsx)(n.code,{children:"true"})," (all users allowed)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Validator Active"}),": Delegates to ",(0,t.jsx)(n.code,{children:"IUserValidator.canExecute(user)"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Used By"}),": Called internally by ",(0,t.jsx)(n.code,{children:"validateAndConsumeNonce"})," before processing transactions"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"External Use"}),": Services can call this to pre-validate users before requesting signatures"]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"integration",children:"Integration"}),"\n",(0,t.jsxs)(n.p,{children:["This function is called during every transaction validation in ",(0,t.jsx)(n.code,{children:"validateAndConsumeNonce"}),". When a UserValidator is configured, it enables:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Compliance filtering (KYC/AML requirements)"}),"\n",(0,t.jsx)(n.li,{children:"Whitelist/blacklist management"}),"\n",(0,t.jsx)(n.li,{children:"Dynamic access control based on external conditions"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"example-3",children:"Example"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-solidity",children:'// Pre-validate user before requesting signature\nif (!core.canExecuteUserTransaction(userAddress)) {\n    revert("User is not authorized to execute transactions");\n}\n\n// Request signature from user\nbytes memory signature = requestUserSignature(userAddress, ...);\n\n// Proceed with transaction\ncore.validateAndConsumeNonce(userAddress, ...);\n'})}),"\n",(0,t.jsx)(n.h4,{id:"related-functions",children:"Related Functions"}),"\n",(0,t.jsx)(n.p,{children:"For UserValidator management, see:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/Contracts/EVVM/SignatureAndNonceManagement#proposeuservalidator",children:"proposeUserValidator"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/Contracts/EVVM/SignatureAndNonceManagement#acceptuservalidatorproposal",children:"acceptUserValidatorProposal"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/docs/Contracts/EVVM/SignatureAndNonceManagement#canceluservalidatorproposal",children:"cancelUserValidatorProposal"})}),"\n"]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"balance-and-staking-functions",children:"Balance and Staking Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getbalance",children:"getBalance"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getBalance(address,address)"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets the balance of a specific token for a user stored in the EVVM system."}),"\n",(0,t.jsx)(n.h4,{id:"input-parameters-5",children:"Input Parameters"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"user"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address to check balance for"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"token"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Token contract address to check"})]})]})]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-10",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint"})}),(0,t.jsx)(n.td,{children:"Current token balance for the user"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"isaddressstaker",children:"isAddressStaker"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}
1),": ",(0,t.jsx)(n.code,{children:"isAddressStaker(address)"})]}),"\n",(0,t.jsx)(n.p,{children:"Checks if an address is registered as a staker with transaction processing privileges and reward eligibility."}),"\n",(0,t.jsx)(n.h4,{id:"input-parameters-6",children:"Input Parameters"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"user"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address to check staker status for"})]})})]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-11",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"bool"})}),(0,t.jsx)(n.td,{children:"True if the address is a registered staker"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"economic-system-functions",children:"Economic System Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getrewardamount",children:"getRewardAmount"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getRewardAmount()"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets the current MATE token reward amount distributed to stakers for transaction processing."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-12",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Current reward amount in MATE tokens"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getprincipaltokentotalsupply",children:"getPrincipalTokenTotalSupply"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getPrincipalTokenTotalSupply()"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets the total supply of the principal token (MATE) used for era transition calculations."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-13",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Total supply of MATE tokens"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"proxy-and-governance-functions",children:"Proxy and Governance Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getcurrentimplementation",children:"getCurrentImplementation"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getCurrentImplementation()"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets the current active implementation contract address used by the proxy for delegatecalls."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-14",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address of the current implementation contract"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getfulldetailimplementation",children:"getFullDetailImplementation"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getFullDetailImplementation()"})]}),"\n",(0,t.jsx)(n.p,{children:"Returns the full implementation proposal details including current implementation, proposed implementation, and time-to-accept."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-15",children:"Return Value"}),"\n",(0,t.jsxs)(n.p,{children:["Returns an ",(0,t.jsx)(n.code,{children:"AddressTypeProposal"})," struct containing:"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"current"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Current active implementation address"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"proposal"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Proposed implementation address (zero if none)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"timeToAccept"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Timestamp when proposal can be accepted"})]})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"gettimetoacceptimplementation",children:"getTimeToAcceptImplementation"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getTimeToAcceptImplementation()"})]}),"\n",(0,t.jsx)(n.p,{children:"Returns the time delay required before a proposed implementation upgrade can be accepted. This is a constant value (30 days)."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-16",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Constant time delay in seconds (30 days) for implementation upgrades"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"administrative-functions",children:"Administrative Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getcurrentadmin",children:"getCurrentAdmin"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getCurrentAdmin()"})]}),"\n",(0,t.jsx)(n.p,{children:"Gets the current admin address with administrative privileges over the contract."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-17",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Address of the current admin"})]})})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getfulldetailadmin",children:"getFullDetailAdmin"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getFullDetailAdmin()"})]}),"\n",(0,t.jsx)(n.p,{children:"Returns the full admin proposal details including current admin, proposed admin, and time-to-accept."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-18",children:"Return Value"}),"\n",(0,t.jsxs)(n.p,{children:["Returns an ",(0,t.jsx)(n.code,{children:"AddressTypeProposal"})," struct containing:"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"current"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Current active admin address"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"proposal"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Proposed admin address (zero if no proposal)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"timeToAccept"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Timestamp when proposal can be accepted"})]})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"uservalidator-functions",children:"UserValidator Functions"}),"\n",(0,t.jsx)(n.h3,{id:"getuservalidatoraddress",children:"getUserValidatorAddress"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getUserValidatorAddress()"})]}),"\n",(0,t.jsxs)(n.p,{children:["Gets the current active UserValidator contract address. Returns ",(0,t.jsx)(n.code,{children:"address(0)"})," if no validator is configured."]}),"\n",(0,t.jsx)(n.h4,{id:"return-value-19",children:"Return Value"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsxs)(n.td,{children:["Address of active UserValidator contract or ",(0,t.jsx)(n.code,{children:"address(0)"})]})]})})]}),"\n",(0,t.jsx)(n.admonition,{title:"What is UserValidator?",type:"info",children:(0,t.jsxs)(n.p,{children:["UserValidator is an optional contract that can filter which users are allowed to execute transactions in the EVVM ecosystem. See ",(0,t.jsx)(n.a,{href:"/docs/Contracts/EVVM/SignatureAndNonceManagement#uservalidator-system",children:"UserValidator System"})," for details."]})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h3,{id:"getfulldetailuservalidator",children:"getFullDetailUserValidator"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Function Type"}),": ",(0,t.jsx)(n.code,{children:"view"}),(0,t.jsx)(n.br,{}),"\n",(0,t.jsx)(n.strong,{children:"Function Signature"}),": ",(0,t.jsx)(n.code,{children:"getFullDetailUserValidator()"})]}),"\n",(0,t.jsx)(n.p,{children:"Returns the full UserValidator proposal details including current validator, proposed validator, and time-to-accept."}),"\n",(0,t.jsx)(n.h4,{id:"return-value-20",children:"Return Value"}),"\n",(0,t.jsxs)(n.p,{children:["Returns an ",(0,t.jsx)(n.code,{children:"AddressTypeProposal"})," struct containing:"]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"current"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Current active UserValidator address"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"proposal"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"address"})}),(0,t.jsx)(n.td,{children:"Proposed validator address (zero if no proposal)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"timeToAccept"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uint256"})}),(0,t.jsx)(n.td,{children:"Timestamp when proposal can be accepted"})]})]})]}),"\n",(0,t.jsx)(n.h4,{id:"example-4",children:"Example"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-solidity",children:"// Get full validator details\nPro
1posalStructs.AddressTypeProposal memory validatorDetails = \n    core.getFullDetailUserValidator();\n\nif (validatorDetails.proposal != address(0)) {\n    // There's a pending proposal\n    if (block.timestamp >= validatorDetails.timeToAccept) {\n        // Proposal is ready to accept\n    } else {\n        // Still waiting for time-lock\n        uint256 timeRemaining = validatorDetails.timeToAccept - block.timestamp;\n    }\n}\n"})}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.h2,{id:"usage-examples",children:"Usage Examples"}),"\n",(0,t.jsx)(n.h3,{id:"checking-user-balance",children:"Checking User Balance"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-solidity",children:"// Check MATE token balance for a user\nuint256 mateBalance = evvm.getBalance(userAddress, mateTokenAddress);\n\n// Check if user is a staker\nbool isStaker = evvm.isAddressStaker(userAddress);\n"})}),"\n",(0,t.jsx)(n.h3,{id:"nonce-management",children:"Nonce Management"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-solidity",children:"// Get next sync nonce for a user\nuint256 nextNonce = evvm.getNextCurrentSyncNonce(userAddress);\n\n// Check if async nonce is used\nbool nonceUsed = evvm.getIfUsedAsyncNonce(userAddress, customNonce);\n"})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>d,x:()=>c});var s=r(6540);const t={},i=s.createContext(t);function d(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.