# Table of Contents - [API Documentation | Glider API | Glider](#api-documentation-glider-api-glider) - [Main concepts | Glider IDE | Glider](#main-concepts-glider-ide-glider) - [Iterables | Glider IDE | Glider](#iterables-glider-ide-glider) - [API | Glider IDE | Glider](#api-glider-ide-glider) - [LocalVariable.memory_property | Glider IDE | Glider](#localvariable-memory-property-glider-ide-glider) - [LocalVariable.source_code() | Glider IDE | Glider](#localvariable-source-code-glider-ide-glider) - [GlobalVariables | Glider IDE | Glider](#globalvariables-glider-ide-glider) - [ArgumentVariable | Glider IDE | Glider](#argumentvariable-glider-ide-glider) - [ArgumentVariable.index | Glider IDE | Glider](#argumentvariable-index-glider-ide-glider) - [ArgumentVariable.data | Glider IDE | Glider](#argumentvariable-data-glider-ide-glider) - [ArgumentVariable.memory_type | Glider IDE | Glider](#argumentvariable-memory-type-glider-ide-glider) - [Struct | Glider IDE | Glider](#struct-glider-ide-glider) - [ArgumentVariable.source_code() | Glider IDE | Glider](#argumentvariable-source-code-glider-ide-glider) - [Struct.address | Glider IDE | Glider](#struct-address-glider-ide-glider) - [Struct.data | Glider IDE | Glider](#struct-data-glider-ide-glider) - [Struct.fields | Glider IDE | Glider](#struct-fields-glider-ide-glider) - [Structs | Glider IDE | Glider](#structs-glider-ide-glider) - [Structs.exec() | Glider IDE | Glider](#structs-exec-glider-ide-glider) - [Internal | Glider IDE | Glider](#internal-glider-ide-glider) - [CallNode | Glider IDE | Glider](#callnode-glider-ide-glider) - [StateVariables | Glider IDE | Glider](#statevariables-glider-ide-glider) - [CallNode.callee_modifiers() | Glider IDE | Glider](#callnode-callee-modifiers-glider-ide-glider) - [CallNode.callable_name() | Glider IDE | Glider](#callnode-callable-name-glider-ide-glider) - [CallNode.callable() | Glider IDE | Glider](#callnode-callable-glider-ide-glider) - [CallNode.callee_functions() | Glider IDE | Glider](#callnode-callee-functions-glider-ide-glider) - [CallNode.caller_modifiers() | Glider IDE | Glider](#callnode-caller-modifiers-glider-ide-glider) - [CallNode.caller_functions() | Glider IDE | Glider](#callnode-caller-functions-glider-ide-glider) - [CallNode.is_function | Glider IDE | Glider](#callnode-is-function-glider-ide-glider) - [CallNode.callees() | Glider IDE | Glider](#callnode-callees-glider-ide-glider) - [CallNode.callers() | Glider IDE | Glider](#callnode-callers-glider-ide-glider) - [CallNode.callees_recursive() | Glider IDE | Glider](#callnode-callees-recursive-glider-ide-glider) - [CallNode.is_modifier | Glider IDE | Glider](#callnode-is-modifier-glider-ide-glider) - [CallNode.callers_recursive() | Glider IDE | Glider](#callnode-callers-recursive-glider-ide-glider) --- # API Documentation | Glider API | Glider API Domain: `https://data1.hexens.io` ### [](https://glide.gitbook.io/main/glider-api/api-documentation#supported-blockchains) Supported Blockchains **Endpoint:** GET /api/v1/chain/list **Description:** Retrieve a list of all supported blockchains for contract analysis. Use the `chainid` value from the response when analyzing contracts. **Sample Response:** Copy { "chains": [\ {"tag": "ethereum", "chainid": "1"},\ {"tag": "bsc", "chainid": "56"},\ {"tag": "optimism", "chainid": "10"},\ // ....\ ] } * * * ### [](https://glide.gitbook.io/main/glider-api/api-documentation#analyze-contract-risk) Analyze Contract Risk **Endpoint:** GET /api/v1/contract/analyze-risk **Description:** Run a comprehensive risk analysis on a smart contract by specifying its address and chain ID. #### [](https://glide.gitbook.io/main/glider-api/api-documentation#request-parameters) **Request Parameters:** * `address` (string): The smart contract address to analyze. * `chain_id` (string): The blockchain chain ID (use /api/v1/chain/list). * `token` (string): Your authentication token in the format {public\_token}-{private\_token}. #### [](https://glide.gitbook.io/main/glider-api/api-documentation#result-parameters) **Result Parameters:** * `address` – Contract address to be analyzed. * `chain_id` – chain ID. * `info` – General information about the address. * `is_proxy` – `true`/`false`. Indicates whether the provided address is a proxy contract. If it is a proxy, we scan the implementation contract instead of the proxy itself. In the results, we show both the original address provided by the user (`proxy_address`) and the actual implementation address that was scanned (`implementation_address`). * `implementation_address` – See `is_proxy`. * `proxy_address` – See `is_proxy`. * `is_verified` – `true`/`false`. Indicates whether the contract provided by the user is verified. If false, it means the deployer intentionally hid the code, leaving no way for users to check its functionality. * `is_erc20` - `true`/`false`. In case of "`false`", the API output will not include risk breakdown * `results` - Array of risks. Each element of the array contains: * `key`: Risk name * `value`: `true` / `false` — whether the risk exists * `title`: Risk title * `sub_title`: Risk subtitle * `description`: Risk description * `severity`: Risk severity * `market-endorsed`: Property complements the technical and code-analysis-based trust score by indicating whether a token has been broadly adopted, integrated, and trusted by traders, platforms, and end-users over time #### [](https://glide.gitbook.io/main/glider-api/api-documentation#example-request) **Example Request:** Copy curl "https://data1.hexens.io/api/v1/contract/analyze-risk?address=0xdac17f958d2ee523a2206206994597c13d831ec7&chain_id=1&token=publictoken-privatetoken" #### [](https://glide.gitbook.io/main/glider-api/api-documentation#sample-response-erc_20-true) **Sample Response: erc\_20 true** Copy { "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "chain_id": "1", "results": [\ {\ "key": "risk_upgradeable",\ "value": "false",\ "title": "Upgradeable",\ "sub_title": "Token contract can be used by other proxies as delegated implementation",\ "description": "The token contract is designed to also be used as an implementation for proxy contracts to delegate their implementations to.",\ "severity": "info"\ },\ {\ "key": "risk_basic_transfer_fee",\ "value": "true",\ "title": "Basic Transfer Fee",\ "sub_title": "Basic Fee functionality included in transfers",\ "description": "The token contract's transfer or transferFrom functions have a basic fee functionality that can be turned on. This may mean that the receiver address can get fewer or a different amount of tokens than passed within the transfer functions.",\ "severity": "medium"\ },\ {\ "key": "risk_external_call_in_transfer",\ "value": "true",\ "title": "External call in transfer",\ "sub_title": "Transfer functionality is dependent on other contracts",\ "description": "The token contract has at least one external call in its transfer functions. There is a possibility that these external calls may be used to alter the transfer flow, e.g. blocking the transfers or manipulating the amount of tokens being sent.",\ "severity": "medium"\ },\ {\ "key": "risk_pausable",\ "value": "true",\ "title": "Pausable",\ "sub_title": "Token operations can be Paused by an external authority",\ "description": "The token contract has a pausing mechanism implemented and controlled by an external authority. This may mean token operations, such as transfers, can be paused.",\ "severity": "medium"\ },\ {\ "key": "risk_unauthorized_token_approvals",\ "value": "false",\ "title": "Unauthorized Token Approvals",\ "sub_title": "An external authority can Approve tokens for holders",\ "description": "The token contract has approve functionality, using which an external authority can manipulate the allowances of the token holders.",\ "severity": "high"\ },\ {\ "key": "risk_whitelist",\ "value": "false",\ "title": "Whitelist",\ "sub_title": "Whitelist-based functionality implemented in transfers",\ "description": "The token contract's transfer functions have implemented whitelist functionality. This generally means that some token holders have privileges over others; a whitelist can also be used to block transfers for many token holders.",\ "severity": "low"\ },\ {\ "key": "risk_blacklist",\ "value": "true",\ "title": "Blacklist",\ "sub_title": "Transfers can be blocked for specific senders using Blocklist",\ "description": "The token contract's transfer functionality includes checking the token sender address against a controlled blocklist, which may cause a transfer freeze for certain holders.",\ "severity": "high"\ },\ {\ "key": "risk_excessive_token_withdrawal",\ "value": "false",\ "title": "Asset Withdrawal",\ "sub_title": "An external authority can Sweep (transfer out) tokens from the contract",\ "description": "The token contract has asset sweeping (transferring out) functionality for the assets on its balance. While generally, the token contract itself should not hold any assets on its balance, this may impose a risk for users in case the contract is designed to receive tokens or native assets directly.",\ "severity": "info"\ },\ {\ "key": "risk_hidden_fees",\ "value": "false",\ "title": "Hidden fees",\ "sub_title": "Hidden fee functionality included in transfers",\ "description": "The token contract's transfer or transferFrom functions have a hidden fee functionality that can be turned on. This may mean that the receiver address can get fewer or a different amount of tokens than passed within the transfer functions.",\ "severity": "high"\ },\ {\ "key": "risk_blockable_transfer",\ "value": "true",\ "title": "Blockable Transfer",\ "sub_title": "Transfers can be blocked for specific senders using various checks",\ "description": "The token contract's transfer functionality includes checks such as transfer pausing, cooldown period checks, big transfer amounts checks etc. This may cause a transfer freeze for certain holders.",\ "severity": "medium"\ },\ {\ "key": "risk_eth_balance_sweep",\ "value": "false",\ "title": "ETH Balance Sweep",\ "sub_title": "An external authority can Sweep (transfer out) native currency from the contract",\ "description": "The token contract has asset sweeping (transferring out) functionality for the assets on its balance. While generally, the token contract itself should not hold any assets on its balance, this may impose a risk for users in case the contract is designed to receive tokens or native assets directly.",\ "severity": "info"\ },\ {\ "key": "risk_transfer_time_constraints",\ "value": "false",\ "title": "Cooldown checks",\ "sub_title": "Transfers can be Time-Constrained (cooldown periods)",\ "description": "The transfer functions in the token contract have time-based checks. This can implement transfer cooldowns or even fully block token transfers.",\ "severity": "medium"\ },\ {\ "key": "risk_selfdestruct",\ "value": "false",\ "title": "Selfdestruct",\ "sub_title": "Self-destructing token contract",\ "description": "The token contract has self-destruct functionality. This means the storage values, including balances, will be wiped after the contract self-destructs.",\ "severity": "high"\ },\ {\ "key": "risk_proxy",\ "value": "false",\ "title": "Proxy",\ "sub_title": "Token contract is a Proxy (upgradable contract)",\ "description": "The token contract does not directly implement the logic but instead uses the proxy pattern to be upgradable. This means that the contract actual code can be changed at any time, which may impose various risks.",\ "severity": "high"\ },\ {\ "key": "risk_centralized_mint",\ "value": "false",\ "title": "Centralized Mint",\ "sub_title": "An external authority can Mint tokens",\ "description": "The token contract has a token minting functionality that can be called only by an external authority and can affect the actual price of the token, diluting the holders.",\ "severity": "high"\ },\ {\ "key": "risk_balance_manipulation_in_non_standard_functions",\ "value": "false",\ "title": "Balance Manipulation",\ "sub_title": "Balance of the token can be manipulated in non-standard functions",\ "description": "The token contract has callable functions that manipulate the balance and are not standard token functions like transfer/transferFrom or burn/mint functionality.",\ "severity": "medium"\ },\ {\ "key": "risk_centralized_burn",\ "value": "false",\ "title": "Centralized Burn",\ "sub_title": "An external authority can Burn holders' tokens",\ "description": "The token contract has a token burning functionality which can be called only by an external authority and can affect the balances of token holders.",\ "severity": "high"\ }\ ], "info": { "implementation_address": null, "is_proxy": false, "proxy_address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "is_verified": true, "is_erc20": true }, "execution_time": 0.01406703, "score": 0, "market_endorsed": true } #### [](https://glide.gitbook.io/main/glider-api/api-documentation#sample-response-erc_20-false) **Sample Response: erc\_20 false** Copy { "address": "0x000000000000040470635eb91b7ce4d132d616ed", "chain_id": "1", "results": [], "info": { "implementation_address": null, "is_proxy": false, "proxy_address": "0x000000000000040470635eb91b7ce4d132d616ed", "is_verified": true, "is_erc20": false }, "execution_time": 0.013219836, "score": 0, "market_endorsed": false } ### [](https://glide.gitbook.io/main/glider-api/api-documentation#errors) Errors 400 `MISSING_PARAMETERS` Required parameters are missing. Please provide `address`, `chain_id`, and `token`. 400 `INVALID_TOKEN_FORMAT` Token must be in format `public-private` separated by a hyphen. 400 `INVALID_ADDRESS_FORMAT` The address could not be parsed due to an invalid or unrecognized format. 400 `INVALID_CHAIN_ID` Invalid chain ID, must be one of the supported chain IDs. 400 (or 200) `PROCESSING_TIMEOUT` The request took too long to process. Please try again later. _(May still return_ `200`_)_ 400 (or 200) `INTERNAL_ERROR` Something went wrong. Please contact support if the issue persists. _(May still return_ `200`_)_ 429 – Rate limit exceeded. ⚠️ **Note**: Both timeout and internal errors may still arrive in the response body with `status: 200` due to the streaming mechanism. [PreviousSupported Chains](https://glide.gitbook.io/main/glider-api/supported-chains) [NextFAQ](https://glide.gitbook.io/main/glider-api/faq) Last updated 1 month ago --- # Main concepts | Glider IDE | Glider The part of a glider code that will query information from DB is contained in the API module, as well as other high-level graph functions can be found there. The query chain is constructed in DSL format Copy instructions = ( Functions() .with_one_property([MethodProp.EXTERNAL, MethodProp.PUBLIC]) .without_properties([MethodProp.HAS_MODIFIERS, MethodProp.IS_CONSTRUCTOR]) .instructions() .with_callee_function_name("selfdestruct") .exec() ) As you can see here, the chain consists of different types of filterings, such as with\_one\_property, without\_properties, etc. The way to think of this filter chain is that every filter narrows down the set of results before entering the next filter chain. In other words, the filters can also be thought of as a chain joined with a logical AND operator. [](https://glide.gitbook.io/main/glider-ide/api/main-concepts#changing-entities) Changing entities ------------------------------------------------------------------------------------------------------- As can be seen from the code above, the chain can also change the entity it is filtering on. Here, the part `.instructions()` will "level down" to the instructions of the functions that have been filtered previously in the chain, and the user can continue filtering on the new type of entity. Likewise, a "level-up" can also be made, for example, starting filtering with instructions and then changing the query entity to functions. [](https://glide.gitbook.io/main/glider-ide/api/main-concepts#performance-note) Performance note ----------------------------------------------------------------------------------------------------- One should consider performance issues coming from changing entities multiple times during a chain of queries. In such situations, it is much more effective to break it into multiple query chains and then combine the results. [](https://glide.gitbook.io/main/glider-ide/api/main-concepts#pagination-of-results) Pagination of results --------------------------------------------------------------------------------------------------------------- The last part of the query always ends with .exec() call, which can also be used to paginate the results in case the returned set is big. The function can be called with parameters: `exec(limit)` `exec(limit,offset)` [PreviousAPI](https://glide.gitbook.io/main/glider-ide/api) [NextIterables](https://glide.gitbook.io/main/glider-ide/api/iterables) Last updated 1 year ago --- # Iterables | Glider IDE | Glider [APISet](https://glide.gitbook.io/main/glider-ide/api/iterables/apiset) [APIList](https://glide.gitbook.io/main/glider-ide/api/iterables/apilist) [PreviousMain concepts](https://glide.gitbook.io/main/glider-ide/api/main-concepts) [NextAPISet](https://glide.gitbook.io/main/glider-ide/api/iterables/apiset) --- # API | Glider IDE | Glider [](https://glide.gitbook.io/main/glider-ide/api#how-glider-represents-the-contract-code) How Glider represents the contract code ------------------------------------------------------------------------------------------------------------------------------------- Before diving deep into the API classes and methods, let's see an example of how the Glider engine "understands" or represents the contract code. Let's look at the [USDT token contract code](https://vscode.blockscan.com/ethereum/0xdac17f958d2ee523a2206206994597c13d831ec7) : Copy /* ... */ contract TetherToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the contract // @param _name Token Name // @param _symbol Token symbol // @param _decimals Token decimals function TetherToken(uint _initialSupply, string _name, string _symbol, uint _decimals) public { _totalSupply = _initialSupply; name = _name; symbol = _symbol; decimals = _decimals; balances[owner] = _initialSupply; deprecated = false; } // Forward ERC20 methods to upgraded contract if this one is deprecated function transfer(address _to, uint _value) public whenNotPaused { require(!isBlackListed[msg.sender]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function transferFrom(address _from, address _to, uint _value) public whenNotPaused { require(!isBlackListed[_from]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferFromByLegacy(msg.sender, _from, _to, _value); } else { return super.transferFrom(_from, _to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function balanceOf(address who) public constant returns (uint) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).balanceOf(who); } else { return super.balanceOf(who); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value); } else { return super.approve(_spender, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function allowance(address _owner, address _spender) public constant returns (uint remaining) { if (deprecated) { return StandardToken(upgradedAddress).allowance(_owner, _spender); } else { return super.allowance(_owner, _spender); } } // deprecate current contract in favour of a new one function deprecate(address _upgradedAddress) public onlyOwner { deprecated = true; upgradedAddress = _upgradedAddress; Deprecate(_upgradedAddress); } // deprecate current contract if favour of a new one function totalSupply() public constant returns (uint) { if (deprecated) { return StandardToken(upgradedAddress).totalSupply(); } else { return _totalSupply; } } // Issue a new amount of tokens // these tokens are deposited into the owner address // // @param _amount Number of tokens to be issued function issue(uint amount) public onlyOwner { require(_totalSupply + amount > _totalSupply); require(balances[owner] + amount > balances[owner]); balances[owner] += amount; _totalSupply += amount; Issue(amount); } // Redeem tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the redeem // or the call will fail. // @param _amount Number of tokens to be issued function redeem(uint amount) public onlyOwner { require(_totalSupply >= amount); require(balances[owner] >= amount); _totalSupply -= amount; balances[owner] -= amount; Redeem(amount); } function setParams(uint newBasisPoints, uint newMaxFee) public onlyOwner { // Ensure transparency by hardcoding limit beyond which fees can never be added require(newBasisPoints < 20); require(newMaxFee < 50); basisPointsRate = newBasisPoints; maximumFee = newMaxFee.mul(10**decimals); Params(basisPointsRate, maximumFee); } // Called when new token are issued event Issue(uint amount); // Called when tokens are redeemed event Redeem(uint amount); // Called when contract is deprecated event Deprecate(address newAddress); // Called if contract ever adds fees event Params(uint feeBasisPoints, uint maxFee); } For everything in the contract code (except comment sections), there is at least one entity that represents it in the Glider engine and allows the filtering and analysis of that data. [](https://glide.gitbook.io/main/glider-ide/api#contracts) Contracts ------------------------------------------------------------------------- In Glider, every contract, interface, and library is represented by the [Contract](https://glide.gitbook.io/main/glider-ide/api/contract) class. A set of contracts is represented by [Contracts](https://glide.gitbook.io/main/glider-ide/api#contracts) class. There are special flags and methods to distinguish or filter them. In USDT the TetherToken will have a contract object for: Copy contract TetherToken Contract objects can be used to obtain full information about the contract, such as the deployed address, compiler versions/pragmas, state variables, base and derived contracts, etc. That said, the libraries, interfaces, and base contracts used in USDT code will also have a Contract object representing them: Copy library SafeMath { // Contract (is_library: True) //... } //... contract Ownable { //... } //... As one address (one main contract) can have multiple interfaces, libraries, contracts declared or even derived, built in a complex folder structure, Glider will generate Contract objects for all of them, though the address will be the same, and only one contract will be considered to be the main. For the contract that is "main", meaning that its functions are being executed if a transaction is called, the engine marks this contract as "main" to distinguish it from others on the same address; see [Contract.is\_main()](https://glide.gitbook.io/main/glider-ide/api/contract/contract.is_main) . While the [Contract](https://glide.gitbook.io/main/glider-ide/api/contract) class is used to obtain information about a single contract, the [Contracts](https://glide.gitbook.io/main/glider-ide/api#contracts) class is used to query and/or filter contracts from a set or the whole database. Contracts contain references to other entities that belong to those contracts: [Functions](https://glide.gitbook.io/main/glider-ide/api/functions) ([Callables](https://glide.gitbook.io/main/glider-ide/api/callables) ), [Modifiers](https://glide.gitbook.io/main/glider-ide/api/modifiers) ([Callables](https://glide.gitbook.io/main/glider-ide/api/callables) ), [StateVariables](https://glide.gitbook.io/main/glider-ide/api/statevariables) , [Structs](https://glide.gitbook.io/main/glider-ide/api/contract/contract.structs) , [Enums](https://glide.gitbook.io/main/glider-ide/api/contract/contract.enums) , [Errors](https://glide.gitbook.io/main/glider-ide/api/contract/contract.errors) . [](https://glide.gitbook.io/main/glider-ide/api#callables) Callables ------------------------------------------------------------------------- Glider treats functions and modifiers as callable objects. Nonetheless, Glider has [Function](https://glide.gitbook.io/main/glider-ide/api/function) and [Modifier](https://glide.gitbook.io/main/glider-ide/api/modifier) classes that both derive from [Callable](https://glide.gitbook.io/main/glider-ide/api/callable) ### [](https://glide.gitbook.io/main/glider-ide/api#functions) Functions Each function in the contract code is represented by a [Function](https://glide.gitbook.io/main/glider-ide/api/function) object. The set of functions is represented by the [Functions](https://glide.gitbook.io/main/glider-ide/api#functions) object. E.g transfer function in the TetherToken contract Copy // Forward ERC20 methods to upgraded contract if this one is deprecated function transfer(address _to, uint _value) public whenNotPaused { require(!isBlackListed[msg.sender]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } } Or any other function, for example `mul, div, sub, add` functions in the SafeMath library: Copy library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } ### [](https://glide.gitbook.io/main/glider-ide/api#modifiers) Modifiers Each modifier is represented by a [Modifier](https://glide.gitbook.io/main/glider-ide/api/modifier) object. The set of modifiers is represented by a [Modifiers](https://glide.gitbook.io/main/glider-ide/api#modifiers) object. E.g the `onlyOwner` modifier in `Ownable` contract: Copy modifier onlyOwner() { require(msg.sender == owner); _; } Or `onlyPayloadSize` in `BasicToken` contract: Copy modifier onlyPayloadSize(uint size) { require(!(msg.data.length < size + 4)); _; } And `whenNotPaused` and `whenPaused` modifiers in Pauable: Copy modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } [Function](https://glide.gitbook.io/main/glider-ide/api/function) and [Modifier](https://glide.gitbook.io/main/glider-ide/api/modifier) objects can be used to obtain data about a specific object, while [Functions](https://glide.gitbook.io/main/glider-ide/api#functions) and [Modifiers](https://glide.gitbook.io/main/glider-ide/api#modifiers) objects are used to query and/or filter functions/modifiers by specific properties from a set or the whole database. Functions have references to the modifiers that are being used in the function and vice versa. See methods: [Modifier.functions()](https://glide.gitbook.io/main/glider-ide/api/modifier/modifier.functions) and [Function.modifiers()](https://glide.gitbook.io/main/glider-ide/api/function/function.modifiers) for a single function/modifier instance Also: [Modifiers.functions()](https://glide.gitbook.io/main/glider-ide/api/modifier/modifier.functions) and [Functions.modifiers()](https://glide.gitbook.io/main/glider-ide/api/function/function.modifiers) for the set One of the most important references that functions/modifiers have is their reference to their [instructions](https://glide.gitbook.io/main/glider-ide/api/instructions) . [](https://glide.gitbook.io/main/glider-ide/api#instructions) Instructions ------------------------------------------------------------------------------- An easy way to think of an instruction is anything that ends with a semicolon ';' in the code. However, this is not always the case, as with some instructions like if-statements, don't use semicolons. E.g in the function transfer: Copy function transfer(address _to, uint _value) public whenNotPaused { require(!isBlackListed[msg.sender]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } } The instructions will be: Copy require(!isBlackListed[msg.sender]); -- if (deprecated) -- return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); -- else -- return super.transfer(_to, _value); As the Modifier is also a [Callable](https://glide.gitbook.io/main/glider-ide/api/callable) , it also has instructions: Copy modifier whenNotPaused() { require(!paused); _; } Here the `whenNotPaused` modifier's instructions will be: Copy require(!paused); -- _; Note that the special underline symbol (\_), which is also called placer/placeholder, is also considered an instruction. See methods: [Instruction.is\_placer()](https://glide.gitbook.io/main/glider-ide/api/instruction/instruction.is_placeholder) , [Modifier.placer\_instructions()](https://glide.gitbook.io/main/glider-ide/api/modifier/modifier.placeholder_instructions) , [Modifiers.placer\_instructions()](https://glide.gitbook.io/main/glider-ide/api/modifiers/modifiers.placeholder_instructions) The constructors are also considered functions; special methods can be used to query and check that a function is a constructor. As with other entities, the [Instruction](https://glide.gitbook.io/main/glider-ide/api/instruction) object is used to obtain data and analyze one specific instruction, and the [Instructions](https://glide.gitbook.io/main/glider-ide/api#instructions) object is used to query/filter instructions in a set or in a whole database. An instruction on its own usually consists of different parts, for example: Copy require(!paused); This instruction consists of a `require()` call, a boolean expression `!paused` In Glider, the "parts" of the instruction are called [values](https://glide.gitbook.io/main/glider-ide/api/value) . ### [](https://glide.gitbook.io/main/glider-ide/api#value) Value The Value object represents a "part" of the instruction. Value by itself is a base class for different types of values such as [Call](https://glide.gitbook.io/main/glider-ide/api/value/call) , Var, [Literal](https://glide.gitbook.io/main/glider-ide/api/value/literal) etc. E.g. in the instruction Copy require(paused); <-Var-> <----Call-----> The "part" representing the require call, will be of type [Call](https://glide.gitbook.io/main/glider-ide/api/value/call) (class derived from Value), and the value `paused` will be of type Var (class derived from Value) as it represents a variable. [](https://glide.gitbook.io/main/glider-ide/api#arguments) Arguments ------------------------------------------------------------------------- The Argument and Arguments object are mainly used in context of functions and modifiers (as they are the ones having arguments). E.g for the function `setParams` in TetherToken: Copy function setParams(uint newBasisPoints, uint newMaxFee) public onlyOwner { //... } The `newBasisPoints` and `newMaxFee` are arguments of the function, and an Argument object will be used to represent each of them. The [Argument](https://glide.gitbook.io/main/glider-ide/api/argument) class is used to represent a single argument of the function/modifier (callable), while the [Arguments](https://glide.gitbook.io/main/glider-ide/api#arguments) class is used to represent a set of arguments. [](https://glide.gitbook.io/main/glider-ide/api#statevariables) StateVariables ----------------------------------------------------------------------------------- The contracts also have state (storage) variables defined; Glider allows the users to query, filter and analyze them as well. E.g in the contract TetherToken: Copy string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; or in BasicToken: Copy mapping(address => uint) public balances; // additional variables for use if transaction fees ever became necessary uint public basisPointsRate = 0; uint public maximumFee = 0; These state variables will be represented by a StateVariable object each or a StateVariables object for a set (or whole database). [](https://glide.gitbook.io/main/glider-ide/api#localvariables) LocalVariables ----------------------------------------------------------------------------------- The local variables of functions/modifiers are represented by [LocalVariable](https://glide.gitbook.io/main/glider-ide/api/localvariable) and [LocalVariables](https://glide.gitbook.io/main/glider-ide/api#localvariables) classes. E.g. in `BasicToken.transfer()` function: Copy function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32) { uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } uint sendAmount = _value.sub(fee); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); Transfer(msg.sender, owner, fee); } Transfer(msg.sender, _to, sendAmount); } The `uint fee` and `uint sendAmount` will be the local variables defined in the function. [PreviousGlider and Declarative Query Writing](https://glide.gitbook.io/main/glider-ide/glider-and-declarative-query-writing) [NextMain concepts](https://glide.gitbook.io/main/glider-ide/api/main-concepts) Last updated 1 year ago --- # LocalVariable.memory_property | Glider IDE | Glider `property memory_type: str` [](https://glide.gitbook.io/main/glider-ide/api/variables/localvariables/localvariable/localvariable.memory_property#query-example) Query Example ------------------------------------------------------------------------------------------------------------------------------------------------------ Copy from glider import * def query(): functions = ( Functions() .with_name("communityMint") .exec(1) ) for func in functions: local_vars = func.local_variables().list() for local_var in local_vars: print(local_var.memory_type) return functions [](https://glide.gitbook.io/main/glider-ide/api/variables/localvariables/localvariable/localvariable.memory_property#example-output) Example Output -------------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252Fyx722TcDnJn3J83JsHkC%252FScreenshot%25202025-09-10%2520at%25204.05.37%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D7c01f795-672d-4ec6-b0b7-6841cf48ff4a&width=768&dpr=4&quality=100&sign=58cb8fa2&sv=2) [PreviousLocalVariable.index](https://glide.gitbook.io/main/glider-ide/api/variables/localvariables/localvariable/localvariable.index) [NextLocalVariable.source\_code()](https://glide.gitbook.io/main/glider-ide/api/variables/localvariables/localvariable/localvariable.source_code) Last updated 1 month ago --- # LocalVariable.source_code() | Glider IDE | Glider `source_code() → str` [](https://glide.gitbook.io/main/glider-ide/api/variables/localvariables/localvariable/localvariable.source_code#query-example) Query Example -------------------------------------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): functions = ( Functions() .with_name("communityMint") .exec(1) ) for func in functions: local_vars = func.local_variables().list() for local_var in local_vars: print(local_var.source_code()) return functions [](https://glide.gitbook.io/main/glider-ide/api/variables/localvariables/localvariable/localvariable.source_code#example-output) Example Output ---------------------------------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252F3YFEMSUlmJb5ZSREPDqL%252FScreenshot%25202025-09-10%2520at%25204.52.00%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Db2328552-8031-40c1-bbcd-27276d44c40e&width=768&dpr=4&quality=100&sign=84f45314&sv=2) [PreviousLocalVariable.memory\_property](https://glide.gitbook.io/main/glider-ide/api/variables/localvariables/localvariable/localvariable.memory_property) [NextGlobalVariables](https://glide.gitbook.io/main/glider-ide/api/variables/globalvariables) Last updated 1 month ago --- # GlobalVariables | Glider IDE | Glider These classes describe global variables, such as `msg.sender` and `block.timestamp`, in the glider. * `MsgData` | Base: `GlobalVariabe` | object that represents `msg.data` * `MsgGas` | Base: `GlobalVariable` | object that represents `msg.gas` * `MsgSender` | Base: `GlobalVariable` | object that represents `msg.sender` * `MsgSig` | Base: `GlobalVariable` | object that represents `msg.sig` * `MsgValue` | Base: `GlobalVariable` | object that represents `msg.value` * `Now` | Base: `GlobalVariable` | object that represents `now` * `TxGasprice` | Base: `GlobalVariable` | object that represents `tx.gasprice` * `TxOrigin` | Base: `GlobalVariable` | object that represents `tx.origin` * `GlobalVariable` | Base: Object [PreviousLocalVariable.source\_code()](https://glide.gitbook.io/main/glider-ide/api/variables/localvariables/localvariable/localvariable.source_code) [NextArgumentVariable](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable) Last updated 1 year ago --- # ArgumentVariable | Glider IDE | Glider [ArgumentVariable.index](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.index) [ArgumentVariable.data](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.data) [ArgumentVariable.memory\_type](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.memory_type) [ArgumentVariable.source\_code()](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.source_code) [PreviousGlobalVariables](https://glide.gitbook.io/main/glider-ide/api/variables/globalvariables) [NextArgumentVariable.index](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.index) Last updated 1 month ago --- # ArgumentVariable.index | Glider IDE | Glider `property data: Dict` [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.index#query-example) Query Example ----------------------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): functions = ( Functions() .exec(1, 50) ) for func in functions: args = func.arguments() print(f"Argument index: {args.list()[0].get_variable().index}") return functions [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.index#example-output) Example Output ------------------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FPfabrG6cFl83VBUKq75T%252FScreenshot%25202025-09-10%2520at%25204.54.58%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dd87b8653-1b5d-46f1-8a95-17ca7e2ee8c8&width=768&dpr=4&quality=100&sign=cb1dbbad&sv=2) [PreviousArgumentVariable](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable) [NextArgumentVariable.data](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.data) Last updated 1 month ago --- # ArgumentVariable.data | Glider IDE | Glider [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.data#query-example) Query Example ---------------------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): functions = ( Functions() .exec(1, 50) ) for func in functions: args = func.arguments() print(args.list()[0].get_variable().data) return functions [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.data#example-output) Example Output ------------------------------------------------------------------------------------------------------------------------------------ ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252F45q2WeF2i1xDqSw69gRU%252Fimage.png%3Falt%3Dmedia%26token%3D89f1b4ca-a816-4dc5-84ee-55e30a1d7005&width=768&dpr=4&quality=100&sign=5cbd9704&sv=2) ### [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.data#detailed-output) Detailed Output Copy { 'name': 'target', 'canonical_name': 'Address.functionCallWithValue(address,bytes,uint256,string).target', 'type': { 'type': 'elementary', 'name': 'address' }, 'memory_type': 'memory' } [PreviousArgumentVariable.index](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.index) [NextArgumentVariable.memory\_type](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.memory_type) Last updated 1 month ago --- # ArgumentVariable.memory_type | Glider IDE | Glider `property memory_type: str` [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.memory_type#query-example) Query Example ----------------------------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): functions = ( Functions() .exec(1, 50) ) for func in functions: args = func.arguments() print(f"Memory type: {args.list()[0].get_variable().memory_type}") return functions [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.memory_type#example-output) Example Output ------------------------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FHY8kWsNr8USD1IoMvPha%252Fimage.png%3Falt%3Dmedia%26token%3D29bdea83-d9aa-4db9-9236-24f7e193588a&width=768&dpr=4&quality=100&sign=81f6ef56&sv=2) [PreviousArgumentVariable.data](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.data) [NextArgumentVariable.source\_code()](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.source_code) Last updated 1 month ago --- # Struct | Glider IDE | Glider [Struct.address](https://glide.gitbook.io/main/glider-ide/api/struct/struct.address) [Struct.data](https://glide.gitbook.io/main/glider-ide/api/struct/struct.data) [Struct.fields](https://glide.gitbook.io/main/glider-ide/api/struct/struct.fields) [Struct.name](https://glide.gitbook.io/main/glider-ide/api/struct/struct.name) [Struct.source\_code()](https://glide.gitbook.io/main/glider-ide/api/struct/struct.source_code) [PreviousArgumentVariable.source\_code()](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.source_code) [NextStruct.address](https://glide.gitbook.io/main/glider-ide/api/struct/struct.address) --- # ArgumentVariable.source_code() | Glider IDE | Glider `source_code() → str` [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.source_code#query-example) Query Example ----------------------------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): functions = ( Functions() .exec(1, 50) ) for func in functions: args = func.arguments() print(args.list()[0].get_variable().source_code()) return functions [](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.source_code#example-output) Example Output ------------------------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252Fyd3P5p1B4M8NFVXwW4eQ%252Fimage.png%3Falt%3Dmedia%26token%3D0f1a34eb-b014-4a81-a147-4bc6b4c05e17&width=768&dpr=4&quality=100&sign=f356fa75&sv=2) [PreviousArgumentVariable.memory\_type](https://glide.gitbook.io/main/glider-ide/api/variables/argumentvariable/argumentvariable.memory_type) [NextStruct](https://glide.gitbook.io/main/glider-ide/api/struct) Last updated 1 month ago --- # Struct.address | Glider IDE | Glider `property address: str` [](https://glide.gitbook.io/main/glider-ide/api/struct/struct.address#query-example) Query Example ------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): contracts = Contracts().with_name("DefaultReserveInterestRateStrategy").exec(1) for contract in contracts: for struct in contract.structs().exec(): print(struct.address) return contracts [](https://glide.gitbook.io/main/glider-ide/api/struct/struct.address#example-output) Example Output --------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FVNjkFN5GMRuoy7ACRofE%252FScreenshot%25202025-09-10%2520at%25205.03.49%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dd26faf87-56e8-49b1-b941-b68874e2145e&width=768&dpr=4&quality=100&sign=37fafc28&sv=2) [PreviousStruct](https://glide.gitbook.io/main/glider-ide/api/struct) [NextStruct.data](https://glide.gitbook.io/main/glider-ide/api/struct/struct.data) Last updated 1 month ago --- # Struct.data | Glider IDE | Glider `_property_` `data :` `_Dict_` [](https://glide.gitbook.io/main/glider-ide/api/struct/struct.data#query-example) Query Example ---------------------------------------------------------------------------------------------------- Copy from glider import * def query(): contracts = Contracts().with_name("DefaultReserveInterestRateStrategy").exec(1) for contract in contracts: for struct in contract.structs().exec(): print(struct.data) return contracts [](https://glide.gitbook.io/main/glider-ide/api/struct/struct.data#example-output) Example Output ------------------------------------------------------------------------------------------------------ Input below represents the return value of struct.data: Copy { '_key': 'd579420667d21aefc3e8d360573a0b7f', '_id': 'structs/d579420667d21aefc3e8d360573a0b7f', '_rev': '_jw0UR9a-_M', 'name': 'CalcInterestRatesLocalVars', 'fields': [\ {\ 'name': 'totalDebt', \ 'type': \ {\ 'type': 'elementary', \ 'name': 'uint256'\ }\ }, \ {\ 'name': 'currentVariableBorrowRate', \ 'type': {\ 'type': 'elementary', \ 'name': 'uint256'\ }\ }, {\ 'name': 'currentStableBorrowRate', \ 'type': {\ 'type': 'elementary', \ 'name': 'uint256'\ }\ }, {\ 'name': 'currentLiquidityRate', \ 'type': {\ 'type': 'elementary', \ 'name': 'uint256'\ }\ }, {\ 'name': 'utilizationRate', \ 'type': {\ 'type': 'elementary', \ 'name': 'uint256'\ }\ }\ ], 'relative_filepath': '0xa52E67Ae57E9A029a117145700a2E4514762498C_DefaultReserveInterestRateStrategy.sol', 'first_source_line': 148, 'last_source_line': 154, 'start_column': 3, 'end_column': 4, 'address': '0xa52E67Ae57E9A029a117145700a2E4514762498C' } } [PreviousStruct.address](https://glide.gitbook.io/main/glider-ide/api/struct/struct.address) [NextStruct.fields](https://glide.gitbook.io/main/glider-ide/api/struct/struct.fields) Last updated 1 month ago --- # Struct.fields | Glider IDE | Glider `_property_` `fields :` [`_APIList_`](https://glide.gitbook.io/main/glider-ide/api/iterables/apilist) `_[_`[`_StructField_`](https://glide.gitbook.io/main/glider-ide/api/structfield)\ `_]_` [](https://glide.gitbook.io/main/glider-ide/api/struct/struct.fields#query-example) Query Example ------------------------------------------------------------------------------------------------------ Copy from glider import * def query(): contracts = Contracts().with_name("DefaultReserveInterestRateStrategy").exec(1) for contract in contracts: for struct in contract.structs().exec(): for struct_field in struct.fields: print(struct_field.name) return contracts [](https://glide.gitbook.io/main/glider-ide/api/struct/struct.fields#example-output) Example Output -------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252F7AMP8yKhIXsiIgEN8GV9%252FScreenshot%25202025-09-10%2520at%25205.33.42%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3De09379b8-5faf-4692-8dd8-eeb8eb87202f&width=768&dpr=4&quality=100&sign=304e9edc&sv=2) [PreviousStruct.data](https://glide.gitbook.io/main/glider-ide/api/struct/struct.data) [NextStruct.name](https://glide.gitbook.io/main/glider-ide/api/struct/struct.name) Last updated 1 month ago --- # Structs | Glider IDE | Glider [Structs.exec()](https://glide.gitbook.io/main/glider-ide/api/structs/structs.exec) [PreviousStructField.type](https://glide.gitbook.io/main/glider-ide/api/structfield/structfield.type) [NextStructs.exec()](https://glide.gitbook.io/main/glider-ide/api/structs/structs.exec) --- # Structs.exec() | Glider IDE | Glider `exec(``_limit_count: int = 0, offset_count: int = 0_``) →` [`APIList`](https://glide.gitbook.io/main/glider-ide/api/iterables/apilist) `[`[`Struct`](https://glide.gitbook.io/main/glider-ide/api/struct)\ `]` [](https://glide.gitbook.io/main/glider-ide/api/structs/structs.exec#query-example) Query Example ------------------------------------------------------------------------------------------------------ Copy from glider import * def query(): contracts = Contracts().with_name("DefaultReserveInterestRateStrategy").exec(1) for contract in contracts: for struct in contract.structs().exec(): print(struct.name) return contracts [](https://glide.gitbook.io/main/glider-ide/api/structs/structs.exec#example-output) Example Output -------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FZkfD4NGweSHXDzMJ0Jk0%252FScreenshot%25202025-09-10%2520at%25205.43.41%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dba23b381-37ea-43ed-afd7-ffc61a17b410&width=768&dpr=4&quality=100&sign=7b0a3718&sv=2) [PreviousStructs](https://glide.gitbook.io/main/glider-ide/api/structs) [NextInternal](https://glide.gitbook.io/main/glider-ide/api/internal) Last updated 1 month ago --- # Internal | Glider IDE | Glider [CallNode](https://glide.gitbook.io/main/glider-ide/api/internal/callnode) [PreviousStructs.exec()](https://glide.gitbook.io/main/glider-ide/api/structs/structs.exec) [NextCallNode](https://glide.gitbook.io/main/glider-ide/api/internal/callnode) --- # CallNode | Glider IDE | Glider Bases: **object** [CallNode.callee\_functions()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_functions) [CallNode.callees()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees) [CallNode.caller\_functions()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_functions) [CallNode.callers()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers) [PreviousInternal](https://glide.gitbook.io/main/glider-ide/api/internal) [NextCallNode.callable()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callable) --- # StateVariables | Glider IDE | Glider Bases: Queryable Last updated 1 year ago --- # CallNode.callee_modifiers() | Glider IDE | Glider `callee_modifiers() →` [`Modifiers`](https://glide.gitbook.io/main/glider-ide/api/modifiers) [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_modifiers#query-example) Query Example ----------------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): contracts = Contracts().exec(10,1) contract = contracts[0] call_nodes = contract.call_graph().all_nodes() call_node = call_nodes[31] call_node_name = call_node.callable_name() for modifier in call_node.callee_modifiers().exec(): print(f"Function name: {call_node_name} | Callee modifier name: {modifier.name}") return contracts [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_modifiers#output-example) Output Example ------------------------------------------------------------------------------------------------------------------------------- Output below represents printed output from the caller's source code: Copy [\ {\ "print_output": [\ "Function name: renounceOwnership | Callee modifier name: onlyOwner"\ ]\ }\ ] [PreviousCallNode.callee\_functions()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_functions) [NextCallNode.callees()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees) Last updated 1 month ago --- # CallNode.callable_name() | Glider IDE | Glider `callable_name() → str` [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callable_name#query-example) Query Example -------------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): contracts = Contracts().exec(1) contract = contracts[0] call_nodes = contract.call_graph().all_nodes() for call_node in call_nodes: print(call_node.callable_name()) return contracts [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callable_name#example-output) Example Output ---------------------------------------------------------------------------------------------------------------------------- Output below represents printed output from the caller's source code: Copy [\ {\ "print_output": [\ "_msgSender()",\ "_msgData()"\ ]\ }\ ] [PreviousCallNode.callable()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callable) [NextCallNode.callee\_functions()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_functions) Last updated 1 month ago --- # CallNode.callable() | Glider IDE | Glider `callable() →` [`Callable`](https://glide.gitbook.io/main/glider-ide/api/callable) [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callable#query-example) Query Example --------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): contracts = Contracts().exec(1) contract = contracts[0] call_nodes = contract.call_graph().all_nodes() for call_node in call_nodes: callable = call_node.callable() print(callable.signature()) return contracts [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callable#example-output) Example Output ----------------------------------------------------------------------------------------------------------------------- Output below represents printed output from the caller's source code: Copy [\ {\ "print_output": [\ "_msgSender()",\ "_msgData()"\ ]\ }\ ] [PreviousCallNode](https://glide.gitbook.io/main/glider-ide/api/internal/callnode) [NextCallNode.callable\_name()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callable_name) Last updated 1 month ago --- # CallNode.callee_functions() | Glider IDE | Glider `callee_functions() →` [`Functions`](https://glide.gitbook.io/main/glider-ide/api/functions) [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_functions#query-example) Query Example ----------------------------------------------------------------------------------------------------------------------------- Copy from glider import * # task: find a function that has `burn*` call and print all the functions that is called from it def query(): data = [] instructions = Instructions().with_callee_name_prefix('burn').exec(10) for instruction in instructions: if len(data) > 0: break # demo first result only functionContainsBurn = instruction.get_parent() #api.functions.Function (*) contract = functionContainsBurn.get_contract() #api.contracts.Contract call_graph = contract.call_graph() #api.call_graph.CallGraph nodes = call_graph.nodes() #Dict[str, CallNode] for id in nodes: if(id != functionContainsBurn.db_id): continue callee_functions = nodes[id].callee_functions() #api.functions.Functions callees = callee_functions.exec() #List[Function] if len(callees) > 0: print(functionContainsBurn.source_code()) for callee in callees: print("callee: " + callee.name) data.append(instruction) return data [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_functions#example-output) Example Output ------------------------------------------------------------------------------------------------------------------------------- Output below represents printed output from the caller's source code: Copy { "print_output": [\ "function _burnRusdHeld() internal {\n rusd().burn(rusdBalance());\n }",\ "callee: rusd",\ "callee: rusdBalance",\ "callee: burn",\ "callee: burn"\ ] } [PreviousCallNode.callable\_name()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callable_name) [NextCallNode.callee\_modifiers()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_modifiers) Last updated 1 month ago --- # CallNode.caller_modifiers() | Glider IDE | Glider `caller_modifiers() →` [`Modifiers`](https://glide.gitbook.io/main/glider-ide/api/modifiers) [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_modifiers#query-example) Query Example ----------------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): contracts = Contracts().exec(1,3) contract = contracts[0] call_nodes = contract.call_graph().all_nodes() call_node = call_nodes[43] print(f"Call node function name: {call_node.callable_name()}") for modifier in call_node.caller_modifiers().exec(): print(f"Caller modifier name {modifier.name}") return contracts [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_modifiers#example-output) Example Output ------------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FoTOa63g6FVzIV4gudzLz%252FScreenshot%25202025-09-10%2520at%25206.10.08%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Ddd1175ef-6925-4574-be14-2271a0575778&width=768&dpr=4&quality=100&sign=e656710&sv=2) [PreviousCallNode.caller\_functions()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_functions) [NextCallNode.callers()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers) Last updated 1 month ago --- # CallNode.caller_functions() | Glider IDE | Glider `caller_functions() →` [`Functions`](https://glide.gitbook.io/main/glider-ide/api/functions) [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_functions#query-example) Query Example ----------------------------------------------------------------------------------------------------------------------------- Copy from glider import * # task: find a function that has `burn*` call and return all the functions that has a call to that function def query(): data = [] instructions = Instructions().with_callee_name_prefix('burn').exec(10) for instruction in instructions: if len(data) > 0: break # demo first result only functionContainsBurn = instruction.get_parent() #api.functions.Function (*) contract = functionContainsBurn.get_contract() #api.contracts.Contract call_graph = contract.call_graph() #api.call_graph.CallGraph nodes = call_graph.nodes() #Dict[str, CallNode] for id in nodes: if(id != functionContainsBurn.db_id): continue caller_functions = nodes[id].caller_functions #api.functions.Functions callers = caller_functions().exec() #List[Function] if len(callers) > 0: print(functionContainsBurn.source_code()) for caller in callers: print(caller.source_code()) data.append(instruction) return data [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_functions#example-output) Example Output ------------------------------------------------------------------------------------------------------------------------------- Output below represents printed output from the caller's source code: Copy { "print_output": [\ "function _beforeTokenTransfer(\n address from,address to,uint256 amount\n ) internal virtual override {\n super._beforeTokenTransfer(from,to,amount);\n \n if (from == address(0) && to != address(0)) {\n require(_erc20TokenAddress != address(0),\"_erc20TokenAddress must be defined\");\n uint256 balanceOfAddress = IERC20(_erc20TokenAddress).balanceOf(to);\n require(balanceOfAddress >= 1,\"user does not hold a token\");\n ERC20Burnable(_erc20TokenAddress).burnFrom(to,1);\n }\n }",\ "function _mint(address to,uint256 tokenId) internal virtual {\n require(to != address(0),\"ERC721: mint to the zero address\");\n require(!_exists(tokenId),\"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0),to,tokenId);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0),to,tokenId);\n\n _afterTokenTransfer(address(0),to,tokenId);\n }",\ "function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner,address(0),tokenId);\n\n \n _approve(address(0),tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner,address(0),tokenId);\n\n _afterTokenTransfer(owner,address(0),tokenId);\n }",\ "function _transfer(\n address from,address to,uint256 tokenId\n ) internal virtual {\n require(ERC721.ownerOf(tokenId) == from,\"ERC721: transfer from incorrect owner\");\n require(to != address(0),\"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from,to,tokenId);\n\n \n _approve(address(0),tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from,to,tokenId);\n\n _afterTokenTransfer(from,to,tokenId);\n }"\ ] } [PreviousCallNode.callees()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees) [NextCallNode.caller\_modifiers()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_modifiers) Last updated 1 month ago --- # CallNode.is_function | Glider IDE | Glider `_property_` `is_function : bool` [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.is_function#query-example) Query Example ------------------------------------------------------------------------------------------------------------------------ Copy from glider import * def query(): contracts = Contracts().exec(1,3) contract = contracts[0] call_nodes = contract.call_graph().all_nodes() call_node = call_nodes[13] print(f"Is call node {call_node.callable_name()} a function: {call_node.is_function}") return contracts [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.is_function#example-output) Example Output -------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FXTe1dOQ4L9BhmYEQektC%252FScreenshot%25202025-09-10%2520at%25206.08.26%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dc395ca46-b1b9-4b15-ad0b-f209501c9c19&width=768&dpr=4&quality=100&sign=de87c8d3&sv=2) [PreviousCallNode.callers\_recursive()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers_recursive) [NextCallNode.is\_modifier](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.is_modifier) Last updated 1 month ago --- # CallNode.callees() | Glider IDE | Glider `callees() →` [`APIList`](https://glide.gitbook.io/main/glider-ide/api/iterables/apilist) `[`[`CallNode`](https://glide.gitbook.io/main/glider-ide/api/internal/callnode)\ `]` [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees#query-example) Query Example -------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): data = [] instructions = Instructions().with_callee_name_prefix('burn').exec(10) for instruction in instructions: if len(data) > 0: break # demo first result only functionContainsBurn = instruction.get_parent() #api.functions.Function (*) contract = functionContainsBurn.get_contract() #api.contracts.Contract call_graph = contract.call_graph() #api.call_graph.CallGraph nodes = call_graph.nodes() #Dict[str, CallNode] for id in nodes: if(id != functionContainsBurn.db_id): continue callees = nodes[id].callees() #List[CallNode] if len(callees) > 0: print(functionContainsBurn.source_code()) for callee in callees: print("callee: " + callee.callable_name()) data.append(instruction) return data [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees#example-output) Example Output ---------------------------------------------------------------------------------------------------------------------- Output below represents printed output from the caller's source code: Copy { "print_output": [\ "function _burnRusdHeld() internal {\n rusd().burn(rusdBalance());\n }",\ "callee: rusd",\ "callee: rusdBalance"\ ] } [PreviousCallNode.callee\_modifiers()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callee_modifiers) [NextCallNode.caller\_functions()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_functions) Last updated 1 month ago --- # CallNode.callers() | Glider IDE | Glider `callers() →` [`APIList`](https://glide.gitbook.io/main/glider-ide/api/iterables/apilist) `[`[`CallNode`](https://glide.gitbook.io/main/glider-ide/api/internal/callnode)\ `]` [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers#query-example) Query Example -------------------------------------------------------------------------------------------------------------------- Copy from glider import * def query(): data = [] instructions = Instructions().with_callee_name_prefix('burn').exec(10) for instruction in instructions: if len(data) > 0: break # demo first result only functionContainsBurn = instruction.get_parent() #api.functions.Function (*) contract = functionContainsBurn.get_contract() #api.contracts.Contract call_graph = contract.call_graph() #api.call_graph.CallGraph nodes = call_graph.nodes() #Dict[str, CallNode] for id in nodes: if(id != functionContainsBurn.db_id): continue callers = nodes[id].callers() # APIList[CallNode] if len(callers) > 0: print(functionContainsBurn.source_code()) for caller in callers: print("caller: " + caller.callable_name()) data.append(instruction) return data [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers#example-output) Example Output ---------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FYNs2Zl9LYO8Y2lc2GBEJ%252FScreenshot%25202025-09-10%2520at%25206.09.37%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3Dfce5554d-4afb-4e14-895e-42da5220b2de&width=768&dpr=4&quality=100&sign=3f9a0ae4&sv=2) [PreviousCallNode.caller\_modifiers()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.caller_modifiers) [NextCallNode.callees\_recursive()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees_recursive) Last updated 1 month ago --- # CallNode.callees_recursive() | Glider IDE | Glider `callees_recursive() →` [`APISet`](https://glide.gitbook.io/main/glider-ide/api/iterables/apiset) `[`[`CallNode`](https://glide.gitbook.io/main/glider-ide/api/internal/callnode)\ `]` [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees_recursive#query-example) Query Example ------------------------------------------------------------------------------------------------------------------------------ Copy from glider import * def query(): contracts = Contracts().exec(1,3) contract = contracts[0] call_nodes = contract.call_graph().all_nodes() call_node = call_nodes[32] print(f"Call node callable name: {call_node.callable_name()}") for callee in call_node.callees_recursive(): print(f"Extended callee callable name: {callee.callable_name()}") return contracts [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees_recursive#example-output) Example Output -------------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FPw44N2HGzjXsfiFUI7jd%252FScreenshot%25202025-09-10%2520at%25206.09.15%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D9f33dc87-ee8b-409e-8d7e-3877de0db8aa&width=768&dpr=4&quality=100&sign=5f065531&sv=2) [PreviousCallNode.callers()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers) [NextCallNode.callers\_recursive()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers_recursive) Last updated 1 month ago --- # CallNode.is_modifier | Glider IDE | Glider `_property_` `is_function : bool` [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.is_modifier#query-example) Query Example ------------------------------------------------------------------------------------------------------------------------ Copy from glider import * def query(): contracts = Contracts().exec(1,3) contract = contracts[0] call_nodes = contract.call_graph().all_nodes() call_node = call_nodes[55] print(f"Is call node {call_node.callable_name()} a modifier: {call_node.is_modifier}") return contracts [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.is_modifier#example-output) Example Output -------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252Fhr1XLwHoEJlXWXeeo2TD%252FScreenshot%25202025-09-10%2520at%25206.07.36%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D21b67f64-e160-4c93-a95f-79b7e36a4a04&width=768&dpr=4&quality=100&sign=c65034ed&sv=2) [PreviousCallNode.is\_function](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.is_function) [NextGlider Usage](https://glide.gitbook.io/main/glider-ide/glider-usage) Last updated 1 month ago --- # CallNode.callers_recursive() | Glider IDE | Glider `callers_recursive() →` [`APISet`](https://glide.gitbook.io/main/glider-ide/api/iterables/apiset) `[`[`CallNode`](https://glide.gitbook.io/main/glider-ide/api/internal/callnode)\ `]` [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers_recursive#query-example) Query Example ------------------------------------------------------------------------------------------------------------------------------ Copy from glider import * def query(): contracts = Contracts().exec(1,3) contract = contracts[0] call_nodes = contract.call_graph().all_nodes() call_node = call_nodes[13] print(f"Call node callable name: {call_node.callable_name()}") for callee in call_node.callers_recursive(): print(f"Extended caller callable name: {callee.callable_name()}") return contracts [](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callers_recursive#example-output) Example Output -------------------------------------------------------------------------------------------------------------------------------- ![](https://glide.gitbook.io/main/~gitbook/image?url=https%3A%2F%2F2237101709-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FDX4Ojc4j1ef51TUAtYOx%252Fuploads%252FuTyBv2TmJOs0uuDfHYNG%252FScreenshot%25202025-09-10%2520at%25206.08.48%25E2%2580%25AFPM.png%3Falt%3Dmedia%26token%3D329a49e5-9a37-4066-8efa-f5ee21554bd6&width=768&dpr=4&quality=100&sign=e647f8c5&sv=2) [PreviousCallNode.callees\_recursive()](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.callees_recursive) [NextCallNode.is\_function](https://glide.gitbook.io/main/glider-ide/api/internal/callnode/callnode.is_function) Last updated 1 month ago ---