aboutsummaryrefslogtreecommitdiffstats
path: root/docs/abi-spec.rst
diff options
context:
space:
mode:
authorJim McDonald <Jim@mcdee.net>2017-12-13 02:47:30 +0800
committerJim McDonald <Jim@mcdee.net>2017-12-13 02:47:30 +0800
commit6e521d59b0a30fa0673aaf84559d5b74dbb1eed7 (patch)
tree618b00999c2de8432f222c7b990f51ef4de6b1f0 /docs/abi-spec.rst
parent7614b16dc9b2bb1e267e8f46834b40220fb9f9fb (diff)
downloaddexon-solidity-6e521d59b0a30fa0673aaf84559d5b74dbb1eed7.tar.gz
dexon-solidity-6e521d59b0a30fa0673aaf84559d5b74dbb1eed7.tar.zst
dexon-solidity-6e521d59b0a30fa0673aaf84559d5b74dbb1eed7.zip
Fix Solidity warnings
Diffstat (limited to 'docs/abi-spec.rst')
-rw-r--r--docs/abi-spec.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst
index e968fb06..e106d98b 100644
--- a/docs/abi-spec.rst
+++ b/docs/abi-spec.rst
@@ -190,9 +190,9 @@ Given the contract:
pragma solidity ^0.4.0;
contract Foo {
- function bar(bytes3[2] xy) {}
- function baz(uint32 x, bool y) returns (bool r) { r = x > 32 || y; }
- function sam(bytes name, bool z, uint[] data) {}
+ function bar(bytes3[2] xy) public {}
+ function baz(uint32 x, bool y) public returns (bool r) { r = x > 32 || y; }
+ function sam(bytes name, bool z, uint[] data) public {}
}
@@ -333,10 +333,10 @@ For example,
pragma solidity ^0.4.0;
contract Test {
- function Test(){ b = 0x12345678901234567890123456789012; }
+ function Test() public { b = 0x12345678901234567890123456789012; }
event Event(uint indexed a, bytes32 b);
event Event2(uint indexed a, bytes32 b);
- function foo(uint a) { Event(a, b); }
+ function foo(uint a) public { Event(a, b); }
bytes32 b;
}
@@ -383,8 +383,8 @@ As an example, the code
contract Test {
struct S { uint a; uint[] b; T[] c; }
struct T { uint x; uint y; }
- function f(S s, T t, uint a) { }
- function g() returns (S s, T t, uint a) {}
+ function f(S s, T t, uint a) public { }
+ function g() public returns (S s, T t, uint a) {}
}
would result in the JSON: