The Solidity Contract-Oriented Programming Language - By chatting here you agree to the https://github.com/ethereum/solidity/blob/develop/CODE_OF_CONDUCT.md
constructor() { owner = payable(msg.sender); }
mean in a contract?
msg.sender
can receive ether
(also asked in compiler channel and they referred me here)
in assembly what is the storage location of return data?
put directly.. given the example below, what is location?
thanks in advance
given
... in contract
modifier defer(... args ..) {
_;
// want to use assembly here to access return data of modified function
// so I imagine it'd be like
bytes memory returnPtr;
assembly {
returnPtr := mload(location)
}
<Type> returnData;
(returnData) = abi.decode(returnPtr, <Type>);
// DO STUFF
}
function someFunction() defer(..args..) {
if (monday) {
return 42;
} else if (tuesday) {
return 32;
}
return 123;
}
Hey masters. Is this $$
a special keyword of solidity ?
function setContract(CoreContracts name, address contractAddress) public {
require(msg.sender == DIRECTORY, $$(ErrorCode(UNAUTHORIZED_CALLER))); <- this is the line with the "$$"
contracts[uint256(name)] = contractAddress;
}
Found in this contract
HI, please ask a question, my project directory structure is like this, now I need to upload the source code to https://etherscan.io
But https://etherscan.io doesn't seem to support source code validation for this structure, it only supports single file source code and multiple file source code in the same directory, and my source code is multiple files in different directories.
Do you have any solution to this problem?
Yes, you can include it on the “data” field of the transaction. I’m not sure of the number of the bytes but the limit is probably not a problem, unless you’re trying to share something huuuge like video or image content. Don’t do that on Ethereum, use IPFS for that.
See this SO question, and you need to add the “data” field to the transaction
https://ethereum.stackexchange.com/questions/87683/trying-to-send-a-transaction-with-ethers-js
Have you heard about the upcoming Bitcoin Bankathon? It's an international hackathon with five challenges to tackle real world problems by building decentralized financial applications. It lasts from November 19th till December 8th and contains a total of 250,000USD-equivalent prizes. If you want to sign up for it, please visit the website: https://bitcoin-alliance.org/
You can build with any language that compiles to the EVM. This includes Solidity, Julia, and new or experimental programming languages such as Vyper.
First of all, thank you Vitalik Buterin !
@Perelyn-sama i would define a dApp, decentralized Application, by now and here, you just need one Component as a smartContract.
To really understand, what a smartContract is, we’ll need some good „openMic“-Sessions, or some defining content.. leacked
bytes32 constant a = bytes32(hex"1e8e1b45c8500eaae36dbdda78698134042397867d83fedc92005af7c108c793");
bytes32 constant b = bytes32(hex"9723a2a3c9b49f62a314da557d9f0e080f0af927614758f525c253a9cfd1597a");
library Lib {
function aaa() internal pure returns (bytes32) {
return a;
}
function bbb() internal pure returns (bytes32) {
return b;
}
}
contract HelloWorld {
function fn() external pure returns (bytes32) {
return Lib.aaa();
}
}