| 273 | } |
| 274 | |
| 275 | func opByte(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { |
| 276 | th, val := stack.pop(), stack.peek() |
| 277 | if th.Cmp(common.Big32) < 0 { |
| 278 | b := math.Byte(val, 32, int(th.Int64())) |
| 279 | val.SetUint64(uint64(b)) |
| 280 | } else { |
| 281 | val.SetUint64(0) |
| 282 | } |
| 283 | evm.interpreter.intPool.put(th) |
| 284 | return nil, nil |
| 285 | } |
| 286 | |
| 287 | // opAddmod Multiplexed verification memory algorithm if z equals max uint |
| 288 | func opAddmod(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { |