if value == current_value
if key is warm
base_dynamic_gas = 100
else
base_dynamic_gas = 100
else if current_value == original_value
if original_value == 0
base_dynamic_gas = 20000
else
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { AdminClient } = require("defender-admin-client"); | |
| const adminClient = new AdminClient({ | |
| apiKey: <<API_KEY>>, | |
| apiSecret: <<API_SECRET>>, | |
| }); | |
| const proposeGrantRole = async () => { | |
| const yourAccont = '<<YOUR EOA>>' | |
| const result = await adminClient.proposeRevokeRole( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { AdminClient } = require("defender-admin-client"); | |
| const adminClient = new AdminClient({ | |
| apiKey: <<API_KEY>>, | |
| apiSecret: <<API_SECRET>>, | |
| }); | |
| const proposeGrantRole = async () => { | |
| const yourAccont = '<<YOUR EOA>>' | |
| const result = await adminClient.proposeGrantRole( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { AdminClient } = require("defender-admin-client"); | |
| const adminClient = new AdminClient({ | |
| apiKey: <<API_KEY>>, | |
| apiSecret: <<API_SECRET>>, | |
| }); | |
| const list = async () => { | |
| const result = await adminClient.listContracts(); | |
| console.log(result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { | |
| createWriteStream, | |
| readFileSync, | |
| truncateSync, | |
| statSync, | |
| writeFileSync, | |
| } = require("fs"); | |
| const { join } = require("path"); | |
| const axios = require("axios"); | |
| const dump = require("./out/4byte.dump.json"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.7.0 <0.9.0; | |
| contract howtobreakremix { | |
| mapping(uint256 => uint256) public a; | |
| mapping(uint256 => uint256) public b; | |
| function cantHandleThisInsaneMath() public { | |
| a[0]++; | |
| a[0]--; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| query level26Winners { | |
| completedLevels(where: { level: "0x128ba32ec698610f2ff8f010a7b74f9985a6d17c" }) { | |
| player | |
| } | |
| } |
0x00882e68305b9f1b05e190a019290bac30c6501ab9f36918d3adc6c4b59e0eac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import models from "db/models"; | |
| const exec = async () => { | |
| const data = { | |
| application: "key", | |
| business: "6228e34ac2e4136212cdbc63", | |
| namespace: "6228e34ac2e4136212cdbc63", | |
| }; | |
| const apiKey = new models.APIKey(data); | |
| return await apiKey.save(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.10; | |
| contract HasDups { | |
| function hasDuplicates(uint[] memory values) public pure returns (bool dups) { | |
| uint max; | |
| for(uint i = 0; i < values.length; i++) { | |
| if(values[i] > max) max = values[i]; | |
| } |