FTM Testnet

Contract

0x2d5d7d31F671F86C782533cc367F14109a082712
Source Code
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 1 internal transaction

Parent Txn Hash Block From To Value
105284142022-09-13 8:43:12445 days 17 hrs ago1663058592  Contract Creation0 FTM
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x47E840...574873e7
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
AxelarGasServiceProxy

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at testnet.ftmscan.com on 2023-06-27
*/

// Source: contracts/gas-service/AxelarGasServiceProxy.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

// File contracts/interfaces/IUpgradable.sol

// General interface for upgradable contracts
interface IUpgradable {
    error NotOwner();
    error InvalidOwner();
    error InvalidCodeHash();
    error InvalidImplementation();
    error SetupFailed();
    error NotProxy();

    event Upgraded(address indexed newImplementation);
    event OwnershipTransferred(address indexed newOwner);

    // Get current owner
    function owner() external view returns (address);

    function contractId() external pure returns (bytes32);

    function implementation() external view returns (address);

    function upgrade(
        address newImplementation,
        bytes32 newImplementationCodeHash,
        bytes calldata params
    ) external;

    function setup(bytes calldata data) external;
}

// File contracts/util/Proxy.sol

contract Proxy {
    error InvalidImplementation();
    error SetupFailed();
    error EtherNotAccepted();
    error NotOwner();
    error AlreadyInitialized();

    // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
    // keccak256('owner')
    bytes32 internal constant _OWNER_SLOT = 0x02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0;

    constructor() {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(_OWNER_SLOT, caller())
        }
    }

    function init(
        address implementationAddress,
        address newOwner,
        bytes memory params
    ) external {
        address owner;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            owner := sload(_OWNER_SLOT)
        }
        if (msg.sender != owner) revert NotOwner();
        if (implementation() != address(0)) revert AlreadyInitialized();
        if (IUpgradable(implementationAddress).contractId() != contractId()) revert InvalidImplementation();

        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(_IMPLEMENTATION_SLOT, implementationAddress)
            sstore(_OWNER_SLOT, newOwner)
        }
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, ) = implementationAddress.delegatecall(
            //0x9ded06df is the setup selector.
            abi.encodeWithSelector(0x9ded06df, params)
        );
        if (!success) revert SetupFailed();
    }

    // solhint-disable-next-line no-empty-blocks
    function contractId() internal pure virtual returns (bytes32) {}

    function implementation() public view returns (address implementation_) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            implementation_ := sload(_IMPLEMENTATION_SLOT)
        }
    }

    // solhint-disable-next-line no-empty-blocks
    function setup(bytes calldata data) public {}

    // solhint-disable-next-line no-complex-fallback
    fallback() external payable {
        address implementaion_ = implementation();
        // solhint-disable-next-line no-inline-assembly
        assembly {
            calldatacopy(0, 0, calldatasize())

            let result := delegatecall(gas(), implementaion_, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())

            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    receive() external payable virtual {
        revert EtherNotAccepted();
    }
}

// File contracts/gas-service/AxelarGasServiceProxy.sol

contract AxelarGasServiceProxy is Proxy {
    function contractId() internal pure override returns (bytes32) {
        return keccak256('axelar-gas-service');
    }
}

Contract ABI

[{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"EtherNotAccepted","type":"error"},{"inputs":[],"name":"InvalidImplementation","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"SetupFailed","type":"error"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"implementation_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"implementationAddress","type":"address"},{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106100385760003560e01c8063378dfd8e146100bf5780635c60da1b146100e15780639ded06df1461012c5761006f565b3661006f576040517f3733483400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006100997f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b90503660008037600080366000845af43d6000803e8080156100ba573d6000f35b3d6000fd5b3480156100cb57600080fd5b506100df6100da366004610465565b61014b565b005b3480156100ed57600080fd5b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040516001600160a01b03909116815260200160405180910390f35b34801561013857600080fd5b506100df610147366004610537565b5050565b7f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c054336001600160a01b038216146101af576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101d97f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6001600160a01b031614610219576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7ffaa2f015f2ce5aee225904728de2def86eb8837491efd21f1a04fc20d8e923f6846001600160a01b0316638291286c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561027357600080fd5b505afa158015610287573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ab91906105a9565b146102e2576040517f68155f9a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b837f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55827f02016836a56b71f0d02689e69e326f4f4c1b9057164ef592671cf0d37c8040c0556000846001600160a01b0316639ded06df8460405160240161034a91906105f2565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516103989190610625565b600060405180830381855af49150503d80600081146103d3576040519150601f19603f3d011682016040523d82523d6000602084013e6103d8565b606091505b5050905080610413576040517f97905dfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b80356001600160a01b038116811461043157600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060006060848603121561047a57600080fd5b6104838461041a565b92506104916020850161041a565b9150604084013567ffffffffffffffff808211156104ae57600080fd5b818601915086601f8301126104c257600080fd5b8135818111156104d4576104d4610436565b604051601f8201601f19908116603f011681019083821181831017156104fc576104fc610436565b8160405282815289602084870101111561051557600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000806020838503121561054a57600080fd5b823567ffffffffffffffff8082111561056257600080fd5b818501915085601f83011261057657600080fd5b81358181111561058557600080fd5b86602082850101111561059757600080fd5b60209290920196919550909350505050565b6000602082840312156105bb57600080fd5b5051919050565b60005b838110156105dd5781810151838201526020016105c5565b838111156105ec576000848401525b50505050565b60208152600082518060208401526106118160408501602087016105c2565b601f01601f19169190910160400192915050565b600082516106378184602087016105c2565b919091019291505056fea2646970667358221220651952c349510bec880aaba14c95732e193a934d9454dc378b340fc36d6ef99c64736f6c63430008090033

Deployed Bytecode Sourcemap

3898:170:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3806:18;;;;;;;;;;;;;;3898:170;3224:22;3249:16;2981:20;2975:27;;2792:228;3249:16;3224:41;;3376:14;3373:1;3370;3357:34;3479:1;3476;3460:14;3457:1;3441:14;3434:5;3421:60;3516:16;3513:1;3510;3495:38;3556:6;3576:68;;;;3695:16;3692:1;3685:27;3576:68;3612:16;3609:1;3602:27;1653:1009;;;;;;;;;;-1:-1:-1;1653:1009:0;;;;;:::i;:::-;;:::i;:::-;;2792:228;;;;;;;;;;-1:-1:-1;2981:20:0;2975:27;2792:228;;-1:-1:-1;;;;;1642:55:1;;;1624:74;;1612:2;1597:18;2792:228:0;;;;;;;3078:45;;;;;;;;;;-1:-1:-1;3078:45:0;;;;;:::i;:::-;;;;1653:1009;1911:11;1905:18;1948:10;-1:-1:-1;;;;;1948:19:0;;;1944:42;;1976:10;;;;;;;;;;;;;;1944:42;2029:1;2001:16;2981:20;2975:27;;2792:228;2001:16;-1:-1:-1;;;;;2001:30:0;;1997:63;;2040:20;;;;;;;;;;;;;;1997:63;4026:31;2087:21;-1:-1:-1;;;;;2075:45:0;;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:63;2071:99;;2147:23;;;;;;;;;;;;;;2071:99;2293:21;2271:20;2264:51;2349:8;2336:11;2329:29;2440:12;2458:21;-1:-1:-1;;;;;2458:34:0;2579:10;2591:6;2556:42;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2458:151;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2439:170;;;2625:7;2620:34;;2641:13;;;;;;;;;;;;;;2620:34;1780:882;;1653:1009;;;:::o;14:196:1:-;82:20;;-1:-1:-1;;;;;131:54:1;;121:65;;111:93;;200:1;197;190:12;111:93;14:196;;;:::o;215:184::-;267:77;264:1;257:88;364:4;361:1;354:15;388:4;385:1;378:15;404:1069;490:6;498;506;559:2;547:9;538:7;534:23;530:32;527:52;;;575:1;572;565:12;527:52;598:29;617:9;598:29;:::i;:::-;588:39;;646:38;680:2;669:9;665:18;646:38;:::i;:::-;636:48;;735:2;724:9;720:18;707:32;758:18;799:2;791:6;788:14;785:34;;;815:1;812;805:12;785:34;853:6;842:9;838:22;828:32;;898:7;891:4;887:2;883:13;879:27;869:55;;920:1;917;910:12;869:55;956:2;943:16;978:2;974;971:10;968:36;;;984:18;;:::i;:::-;1059:2;1053:9;1027:2;1113:13;;-1:-1:-1;;1109:22:1;;;1133:2;1105:31;1101:40;1089:53;;;1157:18;;;1177:22;;;1154:46;1151:72;;;1203:18;;:::i;:::-;1243:10;1239:2;1232:22;1278:2;1270:6;1263:18;1318:7;1313:2;1308;1304;1300:11;1296:20;1293:33;1290:53;;;1339:1;1336;1329:12;1290:53;1395:2;1390;1386;1382:11;1377:2;1369:6;1365:15;1352:46;1440:1;1435:2;1430;1422:6;1418:15;1414:24;1407:35;1461:6;1451:16;;;;;;;404:1069;;;;;:::o;1709:591::-;1779:6;1787;1840:2;1828:9;1819:7;1815:23;1811:32;1808:52;;;1856:1;1853;1846:12;1808:52;1896:9;1883:23;1925:18;1966:2;1958:6;1955:14;1952:34;;;1982:1;1979;1972:12;1952:34;2020:6;2009:9;2005:22;1995:32;;2065:7;2058:4;2054:2;2050:13;2046:27;2036:55;;2087:1;2084;2077:12;2036:55;2127:2;2114:16;2153:2;2145:6;2142:14;2139:34;;;2169:1;2166;2159:12;2139:34;2214:7;2209:2;2200:6;2196:2;2192:15;2188:24;2185:37;2182:57;;;2235:1;2232;2225:12;2182:57;2266:2;2258:11;;;;;2288:6;;-1:-1:-1;1709:591:1;;-1:-1:-1;;;;1709:591:1:o;2305:184::-;2375:6;2428:2;2416:9;2407:7;2403:23;2399:32;2396:52;;;2444:1;2441;2434:12;2396:52;-1:-1:-1;2467:16:1;;2305:184;-1:-1:-1;2305:184:1:o;2494:258::-;2566:1;2576:113;2590:6;2587:1;2584:13;2576:113;;;2666:11;;;2660:18;2647:11;;;2640:39;2612:2;2605:10;2576:113;;;2707:6;2704:1;2701:13;2698:48;;;2742:1;2733:6;2728:3;2724:16;2717:27;2698:48;;2494:258;;;:::o;2757:381::-;2904:2;2893:9;2886:21;2867:4;2936:6;2930:13;2979:6;2974:2;2963:9;2959:18;2952:34;2995:66;3054:6;3049:2;3038:9;3034:18;3029:2;3021:6;3017:15;2995:66;:::i;:::-;3122:2;3101:15;-1:-1:-1;;3097:29:1;3082:45;;;;3129:2;3078:54;;2757:381;-1:-1:-1;;2757:381:1:o;3143:274::-;3272:3;3310:6;3304:13;3326:53;3372:6;3367:3;3360:4;3352:6;3348:17;3326:53;:::i;:::-;3395:16;;;;;3143:274;-1:-1:-1;;3143:274:1:o

Swarm Source

ipfs://651952c349510bec880aaba14c95732e193a934d9454dc378b340fc36d6ef99c

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

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.