gshell_changes

[?]
Oct 13, 2023, 7:01 PM
XCLV7SQMLLOZ6SUV37JAZDXO2TYGBOWNQJROGUS3UX3C2IMSO2JQC

Dependencies

Change contents

  • replacement in psc_at_app/src/style.css at line 915
    [3.17418][3.17418:17460]()
    color: #3610ef;
    font-weight: 500;
    [3.17418]
    [3.17460]
    color: #FD49A0;
  • replacement in psc_at_app/src/index.ts at line 12
    [3.22262][3.22262:22295]()
    import { ethers } from 'ethers';
    [3.22262]
    [3.22295]
    import { ethers, JsonRpcSigner } from 'ethers';
  • edit in psc_at_app/src/index.ts at line 19
    [3.22497][3.22497:22498]()
  • edit in psc_at_app/src/index.ts at line 20
    [3.22499]
    [3.22499]
    declare let ethereum: any;
  • replacement in psc_at_app/src/index.ts at line 313
    [3.31677][3.31677:31747]()
    const provider = new ethers.JsonRpcProvider('https://zkevm-rpc.com');
    [3.31677]
    [3.31747]
    // const provider = new ethers.JsonRpcProvider('https://zkevm-rpc.com');
  • replacement in psc_at_app/src/index.ts at line 317
    [3.31748][3.31748:31814]()
    const usdcAddress = "0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035";
    [3.31748]
    [3.31814]
    const recipientAddress = "0x62613dd9236184ed6a47CCA4fC417e296cA172Be";
  • replacement in psc_at_app/src/index.ts at line 319
    [3.31815][3.31815:32011]()
    // The ERC-20 Contract ABI should work for USDC as well
    const usdcAbi = [
    // Some details about the token
    "function name() view returns (string)",
    "function symbol() view returns (string)",
    [3.31815]
    [3.32011]
    // The amount of ETH to send (0.05 ETH, for example)
    const amount = ethers.parseEther("0.00065");
    // The data you want to include with your transaction
    const data = ethers.hexlify(ethers.toUtf8Bytes("hi hi there nowhere"));
    let provider = new ethers.BrowserProvider(window.ethereum)
  • replacement in psc_at_app/src/index.ts at line 326
    [3.32012][3.32012:32094]()
    // Get the account balance
    "function balanceOf(address) view returns (uint)",
    [3.32012]
    [3.32094]
    async function sending_post() {
  • replacement in psc_at_app/src/index.ts at line 328
    [3.32095][3.32095:32189]()
    // Send some of your tokens to someone else
    "function transfer(address to, uint amount)",
    [3.32095]
    [3.32189]
  • replacement in psc_at_app/src/index.ts at line 330
    [3.32190][3.32190:32333]()
    // An event triggered whenever anyone transfers to someone else
    "event Transfer(address indexed from, address indexed to, uint amount)"
    ];
    [3.32190]
    [3.32333]
    // try {
    // const transaction = {
    // to: recipientAddress,
    // value: amount,
    // data: data, // This is the data field
    // chainId: 1101,
    // };
  • replacement in psc_at_app/src/index.ts at line 339
    [3.32334][3.32334:32431]()
    // The Contract object
    const usdcContract = new ethers.Contract(usdcAddress, usdcAbi, provider);
    [3.32334]
    [3.32431]
    // const txResponse = await signer.sendTransaction(transaction);
    // console.log('Transaction hash:', txResponse.hash);
  • edit in psc_at_app/src/index.ts at line 342
    [3.32432]
    [3.32432]
  • replacement in psc_at_app/src/index.ts at line 344
    [3.32433][3.32433:32476]()
    // Create an instance of the USDC contract
    [3.32433]
    [3.32476]
    // } catch (error) {
    // console.error('Failed to send transaction:', error);
    // }
  • edit in psc_at_app/src/index.ts at line 348
    [3.32477][3.32477:32524]()
    async function generateAccountAndPrintInfo() {
  • replacement in psc_at_app/src/index.ts at line 355
    [3.32665][3.32665:32869]()
    const etherBalance = await provider.getBalance(connectedAddress);
    const etherBalanceInEther = ethers.formatEther(etherBalance);
    console.log('Ether Balance:', etherBalanceInEther);
    [3.32665]
    [3.32869]
    // const etherBalance = await provider.getBalance(connectedAddress);
    // const etherBalanceInEther = ethers.formatEther(etherBalance);
    // console.log('Ether Balance:', etherBalanceInEther);
    const signer = await provider.getSigner(connectedAddress);
    const tx = await signer.sendTransaction({
    to: recipientAddress,
    value: amount,
    data: data // include the data field in your transaction object
    });
    console.log('Transaction hash:', tx.hash);
  • edit in psc_at_app/src/index.ts at line 368
    [3.32870][3.32870:33190]()
    const balanceWei = await usdcContract.balanceOf(connectedAddress);
    // Convert the balance from wei to USDC (wei to ether conversion, but with 6 decimal places instead of 18)
    const balanceUsdc = ethers.formatUnits(balanceWei, 6);
    console.log(`Balance: ${balanceUsdc} USDC`);
  • edit in psc_at_app/src/index.ts at line 369
    [3.33191]
    [3.33191]
    // console.log( await signer.getAddress())
  • replacement in psc_at_app/src/index.ts at line 372
    [3.33221][3.33221:33278]()
    console.error('Failed to get balances:', error);
    [3.33221]
    [3.33278]
    console.error('Failed to send txn:', error);
  • replacement in psc_at_app/src/index.ts at line 380
    [3.33411][3.33411:33450]()
    generateAccountAndPrintInfo();
    [3.33411]
    [3.33450]
    sending_post();
  • replacement in psc_at_app/src/index.ts at line 391
    [3.33564][3.33564:33643]()
    document.getElementById('zkevm_setup').addEventListener('click', async () => {
    [3.33564]
    [3.33643]
    // Function to add the zkEVM network
    async function addZkEVMNetwork() {
  • edit in psc_at_app/src/index.ts at line 408
    [3.34333][3.34333:35013]()
    });
    // Parameters for the USDC token
    const tokenParams = {
    type: 'ERC20',
    options: {
    address: '0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035', // USDC token contract address
    symbol: 'USDC',
    decimals: 6,
    image: 'https://assets.coingecko.com/coins/images/6319/small/USD_Coin_icon.png', // Replace with the URL of the USDC token icon
    },
    };
    // Request to watch the USDC token
    await ethereum.request({
    method: 'wallet_watchAsset',
    params: tokenParams,
  • replacement in psc_at_app/src/index.ts at line 417
    [3.35218][3.35218:35222]()
    });
    [3.35218]
    [3.35222]
    }
  • edit in psc_at_app/src/index.ts at line 419
    [3.35223]
    [3.35223]
    // Set up the event listener
    document.getElementById('zkevm_setup').addEventListener('click', addZkEVMNetwork);
  • replacement in psc_at_app/index.html at line 441
    [3.795722][3.1136:1416]()
    We aspire to create a haven where individuals can share their transformative journeys post-trauma through creative writing. By connecting their MetaMask wallet and adding the zkEVM network to it, users can effortlessly submit their narratives.
    [3.795722]
    [3.796125]
    Embarking on the philiaSocial journey is an expedition into a domain where connections are cherished and explored through the emotional resonance with art. Your MetaMask wallet and the zkEVM network are your keys to this evocative landscape.
  • replacement in psc_at_app/index.html at line 443
    [3.796193][3.1417:1711]()
    Our team will meticulously curate the submissions, showcasing the most sincere, thoughtful, and evocative writings. Authors of selected pieces will be featured on our list on the philiaSocial Seeds, where their work can touch the hearts of a wider audience.
    [3.796193]
    [3.796505]
    As you respond to the introspective prompt, each submission is a thread in a larger tapestry, algorithmically analyzed to align you with others on the philiaSocial network who share a similar emotional cadence with the world of art, fostering enriching interactions.
  • replacement in psc_at_app/index.html at line 445
    [3.796573][2.18:492]()
    Moreover, within the Seed board, listed authors have the opportunity to receive tips as well from our appreciative community. This feature cultivates a culture of encouragement and recognition, further enriching the connection between authors and readers in a refined, supportive environment. Through philiaSocial Seeds, we aim to foster a nurturing space where the narrative of overcoming adversity is celebrated, shared, and supported.
    [3.796573]
    [3.2177]
    At philiaSocial, we are nurturing a culture where the exploration of emotional connections with art takes center stage. It's a realm where the heart meets art, where your feelings find a resonance with others, building a community bound by a shared emotional understanding.
  • replacement in psc_at_app/index.html at line 447
    [3.2245][3.2245:2408]()
    To maintain the quality of our platform by deterring spam, only submissions to us with a tip greater than $3 will be reviewed.
    [3.2245]
    [3.797052]
    A nominal submission fee of at least $3 worth of ETH is the threshold to this bold venture. It's a commitment to a genuine endeavor, a pledge to a community that yearns for a deeper understanding and appreciation of the emotional ties that bind us to art. With each submission, you are contributing to a movement, a collective endeavor to delve deeper into the emotional dialogues that art evokes, and foster meaningful connections therein. Your narrative, your Evo score, are stepping stones towards a community enriched by the emotional landscapes unveiled through the interplay of art and personal connections.