Amoy Testnet

Contract

0x2dDc5DE533509776a705F71c21B60ac07B8949E1

Overview

POL Balance

Polygon PoS Chain Amoy LogoPolygon PoS Chain Amoy LogoPolygon PoS Chain Amoy Logo0 POL

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AllowAllController

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 4 : AllowAllController.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.10 <0.9.0;

import {TablelandController} from "@tableland/evm/contracts/TablelandController.sol";
import {TablelandPolicy} from "@tableland/evm/contracts/TablelandPolicy.sol";

contract AllowAllController is TablelandController {
  function getPolicy(
    address,
    uint256
  ) public payable override returns (TablelandPolicy memory) {
    // Return allow-all policy
    return
      TablelandPolicy({
        allowInsert: true,
        allowUpdate: true,
        allowDelete: true,
        whereClause: "",
        withCheck: "",
        updatableColumns: new string[](0)
      });
  }
}

File 2 of 4 : ITablelandController.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.10 <0.9.0;

import {TablelandPolicy} from "../TablelandPolicy.sol";

/**
 * @dev Interface of a TablelandController compliant contract.
 *
 * This interface can be implemented to enabled advanced access control for a table.
 * Call {ITablelandTables-setController} with the address of your implementation.
 *
 * See {test/TestTablelandController} for an example of token-gating table write-access.
 */
interface ITablelandController {
    /**
     * @dev Returns a {TablelandPolicy} struct defining how a table can be accessed by `caller`.
     */
    function getPolicy(
        address caller,
        uint256 tableId
    ) external payable returns (TablelandPolicy memory);

    /**
     * @notice DEPRECATED. Use {ITablelandController.getPolicy(address, uint256)} instead.
     */
    function getPolicy(
        address caller
    ) external payable returns (TablelandPolicy memory);
}

File 3 of 4 : TablelandController.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.10 <0.9.0;

import {ITablelandController} from "./interfaces/ITablelandController.sol";
import {TablelandPolicy} from "./TablelandPolicy.sol";

abstract contract TablelandController is ITablelandController {
    /**
     * @dev See {ITablelandController-getPolicy}.
     */
    function getPolicy(
        address,
        uint256
    ) external payable virtual override returns (TablelandPolicy memory) {
        revert("not implemented");
    }

    /**
     * @notice DEPRECATED. Use {TablelandController.getPolicy(address, uint256)} instead.
     */
    function getPolicy(
        address
    ) external payable override returns (TablelandPolicy memory) {
        // solhint-disable-next-line reason-string
        revert();
    }
}

File 4 of 4 : TablelandPolicy.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.10 <0.9.0;

/**
 * @dev Object defining how a table can be accessed.
 */
struct TablelandPolicy {
    // Whether or not the table should allow SQL INSERT statements.
    bool allowInsert;
    // Whether or not the table should allow SQL UPDATE statements.
    bool allowUpdate;
    // Whether or not the table should allow SQL DELETE statements.
    bool allowDelete;
    // A conditional clause used with SQL UPDATE and DELETE statements.
    // For example, a value of "foo > 0" will concatenate all SQL UPDATE
    // and/or DELETE statements with "WHERE foo > 0".
    // This can be useful for limiting how a table can be modified.
    // Use {Policies-joinClauses} to include more than one condition.
    string whereClause;
    // A conditional clause used with SQL INSERT statements.
    // For example, a value of "foo > 0" will concatenate all SQL INSERT
    // statements with a check on the incoming data, i.e., "CHECK (foo > 0)".
    // This can be useful for limiting how table data ban be added.
    // Use {Policies-joinClauses} to include more than one condition.
    string withCheck;
    // A list of SQL column names that can be updated.
    string[] updatableColumns;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getPolicy","outputs":[{"components":[{"internalType":"bool","name":"allowInsert","type":"bool"},{"internalType":"bool","name":"allowUpdate","type":"bool"},{"internalType":"bool","name":"allowDelete","type":"bool"},{"internalType":"string","name":"whereClause","type":"string"},{"internalType":"string","name":"withCheck","type":"string"},{"internalType":"string[]","name":"updatableColumns","type":"string[]"}],"internalType":"struct TablelandPolicy","name":"","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getPolicy","outputs":[{"components":[{"internalType":"bool","name":"allowInsert","type":"bool"},{"internalType":"bool","name":"allowUpdate","type":"bool"},{"internalType":"bool","name":"allowDelete","type":"bool"},{"internalType":"string","name":"whereClause","type":"string"},{"internalType":"string","name":"withCheck","type":"string"},{"internalType":"string[]","name":"updatableColumns","type":"string[]"}],"internalType":"struct TablelandPolicy","name":"","type":"tuple"}],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b506102e7806100206000396000f3fe6080604052600436106100295760003560e01c80633791dc6a1461002e57806366df322e14610057575b600080fd5b61004161003c36600461015d565b61006a565b60405161004e91906101c5565b60405180910390f35b610041610065366004610287565b61009e565b6040805160c08101825260008082526020820181905291810182905260608082018190526080820181905260a08201529080fd5b6040805160c08082018352600080835260208084018290528385018290526060808501819052608080860182905260a080870183905287519586018852600180875286850181905286890152875180850189528581529286019290925286518084018852848152908501528551838152918201909552929391929183019190610137565b60608152602001906001900390816101225790505b5090529392505050565b80356001600160a01b038116811461015857600080fd5b919050565b60006020828403121561016f57600080fd5b61017882610141565b9392505050565b6000815180845260005b818110156101a557602081850181015186830182015201610189565b506000602082860101526020601f19601f83011685010191505092915050565b6000602080835283511515818401528084015115156040840152604084015115156060840152606084015160c0608085015261020460e085018261017f565b90506080850151601f19808684030160a0870152610222838361017f565b60a0880151878203830160c089015280518083529194508501925084840190600581901b8501860160005b82811015610279578487830301845261026782875161017f565b9588019593880193915060010161024d565b509998505050505050505050565b6000806040838503121561029a57600080fd5b6102a383610141565b94602093909301359350505056fea26469706673582212209539e6c38222eb130db7724f1c7c74227e3bd93cf27520e8481ec6afebfc380f64736f6c63430008130033

Deployed Bytecode

0x6080604052600436106100295760003560e01c80633791dc6a1461002e57806366df322e14610057575b600080fd5b61004161003c36600461015d565b61006a565b60405161004e91906101c5565b60405180910390f35b610041610065366004610287565b61009e565b6040805160c08101825260008082526020820181905291810182905260608082018190526080820181905260a08201529080fd5b6040805160c08082018352600080835260208084018290528385018290526060808501819052608080860182905260a080870183905287519586018852600180875286850181905286890152875180850189528581529286019290925286518084018852848152908501528551838152918201909552929391929183019190610137565b60608152602001906001900390816101225790505b5090529392505050565b80356001600160a01b038116811461015857600080fd5b919050565b60006020828403121561016f57600080fd5b61017882610141565b9392505050565b6000815180845260005b818110156101a557602081850181015186830182015201610189565b506000602082860101526020601f19601f83011685010191505092915050565b6000602080835283511515818401528084015115156040840152604084015115156060840152606084015160c0608085015261020460e085018261017f565b90506080850151601f19808684030160a0870152610222838361017f565b60a0880151878203830160c089015280518083529194508501925084840190600581901b8501860160005b82811015610279578487830301845261026782875161017f565b9588019593880193915060010161024d565b509998505050505050505050565b6000806040838503121561029a57600080fd5b6102a383610141565b94602093909301359350505056fea26469706673582212209539e6c38222eb130db7724f1c7c74227e3bd93cf27520e8481ec6afebfc380f64736f6c63430008130033

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.