This file contains 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.20; | |
interface IKlaySwapRouterV2 { | |
struct SwapParams { | |
address to; | |
address[] path; | |
address[] pool; | |
uint deadline; |
This file contains 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: Unlicensed | |
pragma solidity ^0.8.0; | |
// This line imports the NonblockingLzApp contract from LayerZero's solidity-examples Github repo. | |
import "https://github.com/LayerZero-Labs/solidity-examples/blob/main/contracts/lzApp/NonblockingLzApp.sol"; | |
// This contract is inheriting from the NonblockingLzApp contract. | |
contract CrossChainHelloWorld is NonblockingLzApp { | |
// A public string variable named "data" is declared. This will be the message sent to the destination. | |
string public data = "Nothing received yet"; | |
This file contains 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.11; | |
import "@klaytn/contracts/KIP/token/KIP17/extensions/KIP17URIStorage.sol"; | |
import "@klaytn/contracts/access/Ownable.sol"; | |
import "@bisonai/orakl-contracts/src/v0.1/VRFConsumerBase.sol"; | |
import "@bisonai/orakl-contracts/src/v0.1/interfaces/VRFCoordinatorInterface.sol"; | |
contract SageBadgeNFT is KIP17URIStorage, VRFConsumerBase, Ownable { |
This file contains 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: Unlicense | |
pragma solidity ^0.8.11; | |
import "@klaytn/contracts/KIP/token/KIP17/extensions/KIP17URIStorage.sol"; | |
import "@klaytn/contracts/utils/Counters.sol"; | |
import "@klaytn/contracts/utils/Strings.sol"; | |
import "@klaytn/contracts/utils/Base64.sol"; | |
// ====================== |
This file contains 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
// Interact with governanceToken contract with caver-js | |
// Import caver.js and each governance contract ABI | |
const Caver = require('caver-js') | |
const governanceTokenABI = require("../abi/governance/governanceToken.json") | |
const governanceMintableTokenABI = require("../abi/governance/govtMintableTokenContract.json") | |
const governanceContractABI = require("../abi/governance/governanceContract.json") | |
// Initialize caver.js and the each governance contract | |
const caver = new Caver('https://api.baobab.klaytn.net:8651/') |
This file contains 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.0; | |
contract KlayBank { | |
mapping(address => uint) public balances; | |
function deposit() public payable { | |
balances[msg.sender] += msg.value; | |
} |
This file contains 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.8.0; | |
import "@klaytn/contracts/KIP/token/KIP17/KIP17.sol"; | |
import "@klaytn/contracts/KIP/token/KIP17/extensions/KIP17Enumerable.sol"; | |
import "@klaytn/contracts/KIP/token/KIP17/extensions/KIP17URIStorage.sol"; | |
import "@klaytn/contracts/utils/Counters.sol"; | |
import "@klaytn/contracts/utils/Strings.sol"; | |
import "@klaytn/contracts/access/Ownable.sol"; |