Skip to content

Instantly share code, notes, and snippets.

View yvesbou's full-sized avatar

Yves Boutellier yvesbou

View GitHub Profile
@yvesbou
yvesbou / DecentralizedStableCoin.sol
Created April 4, 2024 11:47
Simple CDP Stablecoin Workshop
// SPDX-License-Identifier: MIT
// This is considered an Exogenous, Decentralized, Anchored (pegged), Crypto Collateralized low volitility coin
pragma solidity 0.8.24;
import {ERC20Burnable, ERC20} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
@yvesbou
yvesbou / DecentralizedStableCoin.sol
Last active April 4, 2024 12:43
Simple CDP Stablecoin
// SPDX-License-Identifier: MIT
// This is considered an Exogenous, Decentralized, Anchored (pegged), Crypto Collateralized low volitility coin
pragma solidity 0.8.24;
import {ERC20Burnable, ERC20} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
{
"baseUrl": "http://localhost:3000",
"userAgent": "synpress",
"retries": { "runMode": 0, "openMode": 0 },
"integrationFolder": "tests/e2e/specs",
"screenshotsFolder": "screenshots",
"videosFolder": "videos",
"video": true,
"chromeWebSecurity": true,
"viewportWidth": 1366,
describe('Test User Login', () => {
it('Connects with Metamask', () => {
cy.visit('http://localhost:3000')
// find "Connect Wallet" button and click it
cy.contains('Connect Wallet').click();
// assuming there is only metamask popping up
// always important to switch between metamask and cypress window
cy.switchToMetamaskWindow();
// connect to dapp
describe('Test User Login', () => {
it('Connects with Metamask', () => {
cy.visit('https://dappify.com')
cy.contains('Sign').click();
cy.contains('Confirm').click();
// look for Button that says "Connect Wallet" and click it
cy.contains('Connect Wallet').click();
cy.contains('Metamask').click();
// always important to switch between metamask and cypress window
{
"data": {
"updateCoin": {
"id": "620a78c8ded99924b9dda202",
"name": "Helium (HNT)"
}
}
}
mutation updateCoin{
updateCoin(
id: "620a78c8ded99924b9dda202",
input: {
name: "Helium (HNT)"
}){
id
name
}
}
{
"data": {
"coins": [
{
"id": "620a78c2ded99924b9dda200",
"name": "Flux"
},
{
"id": "620a78c8ded99924b9dda202",
"name": "Helium"
mutation deleteCoin {
deleteCoin(id: "620a7804ded99924b9dda1fc"){
id
}
}
{
"data": {
"coins": [
{
"name": "Ethereum",
"id": "620a7804ded99924b9dda1fc"
},
{
"name": "Flux",
"id": "620a78c2ded99924b9dda200"