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
package main | |
import ( | |
"fmt" | |
"github.com/gin-gonic/gin" | |
"github.com/joho/godotenv" | |
"nft-api/config" | |
"nft-api/database" | |
"nft-api/handlers" | |
"nft-api/middleware" |
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
package middleware | |
import ( | |
"github.com/gin-gonic/gin" | |
"gorm.io/gorm" | |
"nft-api/validators" | |
"nft-api/models" | |
"nft-api/config" | |
"time" | |
"net/http" |
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
package handlers | |
import ( | |
"fmt" | |
"net/http" | |
"strings" | |
"time" | |
"nft-api/config" | |
"nft-api/models" | |
"nft-api/validators" |
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
package models | |
import ( | |
"time" | |
"github.com/google/uuid" | |
"gorm.io/gorm" | |
) | |
type User struct { | |
ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;default:gen_random_uuid()"` |
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
package models | |
import ( | |
"time" | |
"github.com/google/uuid" | |
"gorm.io/gorm" | |
) | |
type AuthMessageStatus string |
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.24; | |
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import {CCIPReceiver} from "@chainlink/contracts-ccip/contracts/applications/CCIPReceiver.sol"; | |
import {Client} from "@chainlink/contracts-ccip/contracts/libraries/Client.sol"; | |
import {Counters} from "@openzeppelin/contracts/utils/Counters.sol"; | |
contract NFTReceiver is CCIPReceiver, ERC721 { | |
using Counters for Counters.Counter; |
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.24; | |
import {IRouterClient} from "@chainlink/contracts-ccip/contracts/interfaces/IRouterClient.sol"; | |
import {OwnerIsCreator} from "@chainlink/contracts/src/v0.8/shared/access/OwnerIsCreator.sol"; | |
import {Client} from "@chainlink/contracts-ccip/contracts/libraries/Client.sol"; | |
import {LinkTokenInterface} from "@chainlink/contracts/src/v0.8/shared/interfaces/LinkTokenInterface.sol"; | |
import {Counters} from "@openzeppelin/contracts/utils/Counters.sol"; | |
contract NFTSender { |
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 * as anchor from "@coral-xyz/anchor"; | |
import { BN, Program } from "@coral-xyz/anchor"; | |
import { PublicKey } from "@solana/web3.js"; | |
import { Crudapp } from "../target/types/crudapp"; | |
import { BankrunProvider, startAnchor } from "anchor-bankrun"; | |
const IDL = require("../target/idl/crudapp.json"); | |
const crudAppAddress = new PublicKey( | |
"8RH45jCscGdN5itQ3kt5Zqwhzi3BAVarTrnuvoQEUedg" |
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
#![allow(clippy::result_large_err)] | |
use anchor_lang::prelude::*; | |
declare_id!("8RH45jCscGdN5itQ3kt5Zqwhzi3BAVarTrnuvoQEUedg"); | |
#[program] | |
pub mod crudapp { | |
use super::*; |
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
declare_id!("8RH45jCscGdN5itQ3kt5Zqwhzi3BAVarTrnuvoQEUedg"); |
NewerOlder