Source Code
Overview
ETH Balance
ETH Value
$0.00Cross-Chain Transactions
Loading...
Loading
Contract Name:
Namelime
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity)
/**
*Submitted for verification at lineascan.build/ on 2024-01-13
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
contract Namelime{
uint [] public arr;
// Deleting an element creates a gap in the array.
// One trick to keep the array compact is to.
// move the last element into the place to delete.
function remove(uint index) public {
// Move the last element into the place to delete
arr[index] = arr[arr.length - 1];
// Remove the last element
arr.pop();
}
function test() public {
arr = [1,2,3,4];
remove(1);
// [1, 4, 3]
assert(arr.length == 3);
assert(arr[0] == 1);
assert(arr[1] == 4);
assert(arr[2] == 3);
remove(2);
// [1, 4]
assert(arr.length == 2);
assert(arr[0] == 1);
assert(arr[1] == 4);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"arr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"remove","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"test","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506104d6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80634cc822151461004657806371e5ee5f14610062578063f8a8fd6d14610092575b600080fd5b610060600480360381019061005b9190610359565b61009c565b005b61007c60048036038101906100779190610359565b610119565b6040516100899190610395565b60405180910390f35b61009a61013d565b005b600060016000805490506100b091906103df565b815481106100c1576100c0610413565b5b9060005260206000200154600082815481106100e0576100df610413565b5b90600052602060002001819055506000805480610100576100ff610442565b5b6001900381819060005260206000200160009055905550565b6000818154811061012957600080fd5b906000526020600020016000915090505481565b6040518060800160405280600160ff168152602001600260ff168152602001600360ff168152602001600460ff16815250600090600461017e9291906102af565b50610189600161009c565b60036000805490501461019f5761019e610471565b5b6001600080815481106101b5576101b4610413565b5b9060005260206000200154146101ce576101cd610471565b5b600460006001815481106101e5576101e4610413565b5b9060005260206000200154146101fe576101fd610471565b5b6003600060028154811061021557610214610413565b5b90600052602060002001541461022e5761022d610471565b5b610238600261009c565b60026000805490501461024e5761024d610471565b5b60016000808154811061026457610263610413565b5b90600052602060002001541461027d5761027c610471565b5b6004600060018154811061029457610293610413565b5b9060005260206000200154146102ad576102ac610471565b5b565b8280548282559060005260206000209081019282156102f0579160200282015b828111156102ef578251829060ff169055916020019190600101906102cf565b5b5090506102fd9190610301565b5090565b5b8082111561031a576000816000905550600101610302565b5090565b600080fd5b6000819050919050565b61033681610323565b811461034157600080fd5b50565b6000813590506103538161032d565b92915050565b60006020828403121561036f5761036e61031e565b5b600061037d84828501610344565b91505092915050565b61038f81610323565b82525050565b60006020820190506103aa6000830184610386565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006103ea82610323565b91506103f583610323565b925082820390508181111561040d5761040c6103b0565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea26469706673582212203626227fe04b21ff7a7a32d6d892a0d54a24279563af5aeee0ea0055e13068c364736f6c63430008120033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c80634cc822151461004657806371e5ee5f14610062578063f8a8fd6d14610092575b600080fd5b610060600480360381019061005b9190610359565b61009c565b005b61007c60048036038101906100779190610359565b610119565b6040516100899190610395565b60405180910390f35b61009a61013d565b005b600060016000805490506100b091906103df565b815481106100c1576100c0610413565b5b9060005260206000200154600082815481106100e0576100df610413565b5b90600052602060002001819055506000805480610100576100ff610442565b5b6001900381819060005260206000200160009055905550565b6000818154811061012957600080fd5b906000526020600020016000915090505481565b6040518060800160405280600160ff168152602001600260ff168152602001600360ff168152602001600460ff16815250600090600461017e9291906102af565b50610189600161009c565b60036000805490501461019f5761019e610471565b5b6001600080815481106101b5576101b4610413565b5b9060005260206000200154146101ce576101cd610471565b5b600460006001815481106101e5576101e4610413565b5b9060005260206000200154146101fe576101fd610471565b5b6003600060028154811061021557610214610413565b5b90600052602060002001541461022e5761022d610471565b5b610238600261009c565b60026000805490501461024e5761024d610471565b5b60016000808154811061026457610263610413565b5b90600052602060002001541461027d5761027c610471565b5b6004600060018154811061029457610293610413565b5b9060005260206000200154146102ad576102ac610471565b5b565b8280548282559060005260206000209081019282156102f0579160200282015b828111156102ef578251829060ff169055916020019190600101906102cf565b5b5090506102fd9190610301565b5090565b5b8082111561031a576000816000905550600101610302565b5090565b600080fd5b6000819050919050565b61033681610323565b811461034157600080fd5b50565b6000813590506103538161032d565b92915050565b60006020828403121561036f5761036e61031e565b5b600061037d84828501610344565b91505092915050565b61038f81610323565b82525050565b60006020820190506103aa6000830184610386565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006103ea82610323565b91506103f583610323565b925082820390508181111561040d5761040c6103b0565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea26469706673582212203626227fe04b21ff7a7a32d6d892a0d54a24279563af5aeee0ea0055e13068c364736f6c63430008120033
Deployed Bytecode Sourcemap
61:788:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;275:201;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;85:18;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;484:362;;;:::i;:::-;;275:201;393:3;410:1;397:3;:10;;;;:14;;;;:::i;:::-;393:19;;;;;;;;:::i;:::-;;;;;;;;;;380:3;384:5;380:10;;;;;;;;:::i;:::-;;;;;;;;;:32;;;;459:3;:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;275:201;:::o;85:18::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;484:362::-;518:15;;;;;;;;525:1;518:15;;;;;;527:1;518:15;;;;;;529:1;518:15;;;;;;531:1;518:15;;;;;:3;:15;;;;;;;:::i;:::-;;546:9;553:1;546:6;:9::i;:::-;609:1;595:3;:10;;;;:15;588:23;;;;:::i;:::-;;639:1;629:3;633:1;629:6;;;;;;;;:::i;:::-;;;;;;;;;;:11;622:19;;;;:::i;:::-;;669:1;659:3;663:1;659:6;;;;;;;;:::i;:::-;;;;;;;;;;:11;652:19;;;;:::i;:::-;;699:1;689:3;693:1;689:6;;;;;;;;:::i;:::-;;;;;;;;;;:11;682:19;;;;:::i;:::-;;714:9;721:1;714:6;:9::i;:::-;774:1;760:3;:10;;;;:15;753:23;;;;:::i;:::-;;804:1;794:3;798:1;794:6;;;;;;;;:::i;:::-;;;;;;;;;;:11;787:19;;;;:::i;:::-;;834:1;824:3;828:1;824:6;;;;;;;;:::i;:::-;;;;;;;;;;:11;817:19;;;;:::i;:::-;;484:362::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o;88:117:1:-;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:329::-;749:6;798:2;786:9;777:7;773:23;769:32;766:119;;;804:79;;:::i;:::-;766:119;924:1;949:53;994:7;985:6;974:9;970:22;949:53;:::i;:::-;939:63;;895:117;690:329;;;;:::o;1025:118::-;1112:24;1130:5;1112:24;:::i;:::-;1107:3;1100:37;1025:118;;:::o;1149:222::-;1242:4;1280:2;1269:9;1265:18;1257:26;;1293:71;1361:1;1350:9;1346:17;1337:6;1293:71;:::i;:::-;1149:222;;;;:::o;1377:180::-;1425:77;1422:1;1415:88;1522:4;1519:1;1512:15;1546:4;1543:1;1536:15;1563:194;1603:4;1623:20;1641:1;1623:20;:::i;:::-;1618:25;;1657:20;1675:1;1657:20;:::i;:::-;1652:25;;1701:1;1698;1694:9;1686:17;;1725:1;1719:4;1716:11;1713:37;;;1730:18;;:::i;:::-;1713:37;1563:194;;;;:::o;1763:180::-;1811:77;1808:1;1801:88;1908:4;1905:1;1898:15;1932:4;1929:1;1922:15;1949:180;1997:77;1994:1;1987:88;2094:4;2091:1;2084:15;2118:4;2115:1;2108:15;2135:180;2183:77;2180:1;2173:88;2280:4;2277:1;2270:15;2304:4;2301:1;2294:15
Swarm Source
ipfs://3626227fe04b21ff7a7a32d6d892a0d54a24279563af5aeee0ea0055e13068c3
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.