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
| public class Constants { | |
| /** | |
| * Contains the path to your Lambda function code. | |
| */ | |
| public static final String LAMBDA_TASK_ROOT = System.getenv("LAMBDA_TASK_ROOT"); | |
| /** | |
| * The environment variable is set to one of the following options, depending on the runtime of the Lambda function: | |
| * AWS_Lambda_nodejs, AWS_Lambda_nodejs4.3, AWS_Lambda_nodejs6.10 |
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 file = document.querySelector("input[type=file]").files[0]; | |
| const reader = new FileReader(); | |
| reader.readAsArrayBuffer(file); | |
| reader.onload = () => { | |
| const key = require("../arweave-keyfile.json"); | |
| const arweave = Arweave.init({ | |
| host: "arweave.net", | |
| port: 443, |
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
| name: Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| branches: | |
| - main |
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
| "txn": async function(req) { | |
| return new Promise(async function(resolve, reject) { | |
| var frame = {}; | |
| frame.id = req.params.id; | |
| frame.square = true; | |
| frame.postUrl = `https://frm.lol/frames/${req.params.id}`; | |
| const frameResult = await util.validate(req); // neynar frame validation endpoint | |
| if (frameResult.valid == true) { | |
| if ("transactionId" in req.body.untrustedData) { | |
| // transaction has completed |
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
| <html> | |
| <head> | |
| <meta name="mobile-web-app-capable" content="yes" /> | |
| <meta name="apple-touch-fullscreen" content="yes" /> | |
| <meta name="apple-mobile-web-app-title" content="Expo" /> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <meta name="apple-mobile-web-app-status-bar-style" content="default" /> | |
| <link | |
| rel="apple-touch-icon" | |
| sizes="180x180" |
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
| var blobUrl = URL.createObjectURL(blob); | |
| var link = document.createElement("a"); // Or maybe get it from the current document | |
| link.href = blobUrl; | |
| link.download = "image.jpg"; | |
| // link.innerText = "Click here to download the file"; | |
| document.body.appendChild(link); // Or append it whereever you want | |
| link.click(); | |
| link.remove(); |
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: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.3/contracts/security/ReentrancyGuard.sol"; | |
| contract Attackee is ReentrancyGuard { | |
| mapping(address => uint) public attackeeBalances; | |
| function depositIntoAttackee() external payable { |
OlderNewer