https://ethereumhistory.com/contract/0xa1ba6548ef27df244e56fd5440f6e4979268d87f
https://ethereumhistory.com/contract/0xa1ba6548ef27df244e56fd5440f6e4979268d87f
https://ethereumhistory.com/contract/0x7aa73b556c0da8ca4e83e483d7404930e946473b
https://ethereumhistory.com/contract/0x7aa73b556c0da8ca4e83e483d7404930e946473b
https://ethereumhistory.com/contract/0xc9534b5f81a7d08be5126cfd25e96bb5b35a2085
https://ethereumhistory.com/contract/0xc9534b5f81a7d08be5126cfd25e96bb5b35a2085
https://ethereumhistory.com/contract/0x8966db77526fa08d4f2e4c242a5b344efee65f97
https://ethereumhistory.com/contract/0x8966db77526fa08d4f2e4c242a5b344efee65f97
https://ethereumhistory.com/contract/0x4478afbd9dafd180d88da6f8a0af4514cc13c409
https://ethereumhistory.com/contract/0x4478afbd9dafd180d88da6f8a0af4514cc13c409
https://ethereumhistory.com/contract/0xbde1546ee133a572986a2c95c0c2f9dbbba32a80
https://ethereumhistory.com/contract/0xbde1546ee133a572986a2c95c0c2f9dbbba32a80
https://ethereumhistory.com/contract/0x98eec1ec45dde9d0d0982ee4512bc5f44af139cf
https://ethereumhistory.com/contract/0x98eec1ec45dde9d0d0982ee4512bc5f44af139cf
https://ethereumhistory.com/contract/0xd11d86a169f2f95fc4b3e5507a34967c5123d682
https://ethereumhistory.com/contract/0xd11d86a169f2f95fc4b3e5507a34967c5123d682
https://ethereumhistory.com/contract/0xc261ee62b45909fb675c703afca18f534d31b359
https://ethereumhistory.com/contract/0xc261ee62b45909fb675c703afca18f534d31b359
https://ethereumhistory.com/contract/0xb9cdbd2d984456b2a42d872265bdcdd1d6f297a6
https://ethereumhistory.com/contract/0xb9cdbd2d984456b2a42d872265bdcdd1d6f297a6
https://ethereumhistory.com/contract/0x7c4400c91cc687a935873adcc36773c566af80b7
https://ethereumhistory.com/contract/0x7c4400c91cc687a935873adcc36773c566af80b7
https://ethereumhistory.com/contract/0x736e9901266d3e84319ae428c4ea3fcbc9f94d1f
https://ethereumhistory.com/contract/0x736e9901266d3e84319ae428c4ea3fcbc9f94d1f
https://ethereumhistory.com/contract/0x40d5082f6d581145e2f4ebca8a5fd5714d5d0b54
https://ethereumhistory.com/contract/0x40d5082f6d581145e2f4ebca8a5fd5714d5d0b54
https://ethereumhistory.com/contract/0x07d39cea6facfccd1dd6e20081545cf809918e8d
https://ethereumhistory.com/contract/0x07d39cea6facfccd1dd6e20081545cf809918e8d
… you know, I really wished I realized so many of these things earlier. 😑
… you know, I really wished I realized so many of these things earlier. 😑
Test it live:
npx hardhat console --network localhost
Then inside console:
const C = await ethers.getContractAt("SimpleStorage", "your_address");
await C.set(123);
(await C.get()).toString();
It returns 123 ✅
#Coding #Blockchain #TryuybXLabs
Test it live:
npx hardhat console --network localhost
Then inside console:
const C = await ethers.getContractAt("SimpleStorage", "your_address");
await C.set(123);
(await C.get()).toString();
It returns 123 ✅
#Coding #Blockchain #TryuybXLabs
Create scripts/deploy.js 👇
async function main(){
const C = await ethers.getContractFactory("SimpleStorage");
const c = await C.deploy();
console.log("Deployed:", await c.getAddress());
}
main().catch(console.error);
#Hardhat #SmartContract #TryuybXLabs
Create scripts/deploy.js 👇
async function main(){
const C = await ethers.getContractFactory("SimpleStorage");
const c = await C.deploy();
console.log("Deployed:", await c.getAddress());
}
main().catch(console.error);
#Hardhat #SmartContract #TryuybXLabs
Example: simplest Solidity contract 👇
pragma solidity ^0.8.0;
contract SimpleStorage {
uint value;
function set(uint _v) public { value=_v; }
function get() public view returns(uint){return value;}
}
Stores a number on-chain.
#Solidity #SmartContract #Coding #TryuybXLabs
Example: simplest Solidity contract 👇
pragma solidity ^0.8.0;
contract SimpleStorage {
uint value;
function set(uint _v) public { value=_v; }
function get() public view returns(uint){return value;}
}
Stores a number on-chain.
#Solidity #SmartContract #Coding #TryuybXLabs