MiniMeToken does not use Truffle framework.
project
│───build
│───contracts
│───js
└───test
smart contract security를 improve해주는 전략과 이 전략을 따르지 않았을 때 문제가 발생할 수 있는 코드를 함께 제시한다. 또한 smart contract를 protect할 수 있는 방법에 대한 코드도 함께 제시한다.
pragma solidity^0.4.12;
contract Test {
function test(uint[20] a) public returns (uint){
return a[10]*2;
}
참고
sending a transaction costs 21000 gas
A recipient contract's fallback function only gets a 2300 gas stipend if it was invoked with recipient.transfer or recipient.send
fallback 함수가 호출되는 여러 경우가 있는데 그 중 receiver.send 함수 또는 receiver.transfer 함수로 인해 receiver의 fallback 함수가 호출된다. 이 때 fallback 함수 호출과 함께 2300gas를 봉급으로 주어지게 된다.
This is the same as an external account paying recipient with web3.eth.sendTransaction({to:recipient, gas:21000, ...}).
What are the differences between RLP and HP encoding? How does HP encoding work?
Root: {1: 'Dog', 2: B, 3: A}
A: {1: C, 2: D, 3: 'Cat'}
B: {1: 'Goat', 2: 'Bear', 3: 'Rat'}
C: {1: 'Eagle', 2: 'Parrot', 3: E}
D: {1: 'Shark', 2: 'Dolphin', 3: 'Whale'}
E: {1: 'Duck', 2: 'Chicken', 3: 'Pig'}