https://github.com/rbkgh/yo-portal-smart-contract
yo-portal smart contract consumed on https://yo-project.rbkgh.repl.co/
https://github.com/rbkgh/yo-portal-smart-contract
Last synced: 4 months ago
JSON representation
yo-portal smart contract consumed on https://yo-project.rbkgh.repl.co/
- Host: GitHub
- URL: https://github.com/rbkgh/yo-portal-smart-contract
- Owner: RbkGh
- Created: 2021-12-17T07:24:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-17T07:27:03.000Z (over 4 years ago)
- Last Synced: 2025-01-15T13:57:00.020Z (over 1 year ago)
- Language: JavaScript
- Size: 144 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yo Playfield Smart Contract
# Replace your url and account private key in hardhart.config.js
```json
rinkeby: {
url: 'https://eth-rinkeby.alchemyapi.io/v2/whatever_yours_is_from_alchemy.io',
accounts: ['your_wallet_private_key'],
}
```
# Deploy on Rinkeby or Localhost or Mainnet
```shell
npx hardhat run scripts/deploy.js --network rinkeby
```
```text
Once deployed, your smart contract address will be displayed in console, then you can
pick up your abi file in /artifacts/contracts/YoPortal.sol/YoPortal.json#abi
ie
"abi": [
{
"inputs": [],
"stateMutability": "payable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "message",
"type": "string"
}
],
"name": "NewYo",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "newTotalYoCount",
"type": "uint256"
}
],
"name": "UpdatYoCount",
"type": "event"
},
{
"inputs": [],
"name": "getTotalYoObjects",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "yoInitiator",
"type": "address"
},
{
"internalType": "string",
"name": "message",
"type": "string"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"internalType": "struct YoPortal.Yo[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTotalYos",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "lastYoedAt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_message",
"type": "string"
}
],
"name": "sayYo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
```