File tree Expand file tree Collapse file tree 7 files changed +10
-26
lines changed
overloaded-contract-functions/contracts Expand file tree Collapse file tree 7 files changed +10
-26
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ impl ArweaveAdapter {
1818 }
1919
2020 ArweaveAdapter {
21- endpoint : Url :: parse ( & endpoint) . unwrap ( ) ,
21+ endpoint : Url :: parse ( & endpoint) . expect ( "Invalid Arweave URL" ) ,
2222 http_client : reqwest:: Client :: new ( ) ,
2323 }
2424 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ impl ThreeBoxAdapter {
1616 }
1717
1818 ThreeBoxAdapter {
19- profile_endpoint : Url :: parse ( & profile_endpoint) . unwrap ( ) ,
19+ profile_endpoint : Url :: parse ( & profile_endpoint) . expect ( "Invalid 3box profile URL" ) ,
2020 http_client : reqwest:: Client :: new ( ) ,
2121 }
2222 }
Original file line number Diff line number Diff line change @@ -238,9 +238,9 @@ async fn main() {
238238 ) ,
239239 )
240240 . arg (
241- Arg :: with_name ( "arweave-http " )
241+ Arg :: with_name ( "arweave-api " )
242242 . default_value ( "https://arweave.net/" )
243- . long ( "arweave-http " )
243+ . long ( "arweave-api " )
244244 . value_name ( "URL" )
245245 . help ( "HTTP endpoint of an Arweave gateway" ) ,
246246 )
@@ -338,7 +338,7 @@ async fn main() {
338338 }
339339
340340 let arweave_adapter = Arc :: new ( ArweaveAdapter :: new (
341- matches. value_of ( "arweave-http " ) . unwrap ( ) . to_string ( ) ,
341+ matches. value_of ( "arweave-api " ) . unwrap ( ) . to_string ( ) ,
342342 ) ) ;
343343
344344 let three_box_adapter = Arc :: new ( ThreeBoxAdapter :: new (
Original file line number Diff line number Diff line change @@ -982,7 +982,7 @@ impl WasmiModule {
982982 Ok ( None )
983983 }
984984
985- /// function transactionData(txId: string): Bytes | null
985+ /// function arweave. transactionData(txId: string): Bytes | null
986986 fn arweave_transaction_data (
987987 & mut self ,
988988 tx_id : AscPtr < AscString > ,
@@ -994,7 +994,7 @@ impl WasmiModule {
994994 . or ( Some ( RuntimeValue :: from ( 0 ) ) ) )
995995 }
996996
997- /// function profile(address: string): JSONValue | null
997+ /// function box. profile(address: string): JSONValue | null
998998 fn box_profile ( & mut self , address : AscPtr < AscString > ) -> Result < Option < RuntimeValue > , Trap > {
999999 let address: String = self . asc_get ( address) ;
10001000 let profile = self . ctx . host_exports . box_profile ( & address) ;
Original file line number Diff line number Diff line change 11{
2- "name" : " data-source-context " ,
2+ "name" : " arweave-and-3box " ,
33 "version" : " 0.1.0" ,
44 "scripts" : {
55 "build-contracts" : " rm -rf abis bin && solcjs contracts/Contract.sol --abi -o abis && mv abis/*Contract.abi abis/Contract.abi && solcjs contracts/Contract.sol --bin -o bin && mv bin/*Contract.bin bin/Contract.bin" ,
66 "codegen" : " graph codegen" ,
77 "test" : " yarn build-contracts && truffle test --network test" ,
8- "create:test" : " graph create test/data-source-context --node http://localhost:18020/" ,
9- "deploy:test" : " graph deploy test/data-source-context --ipfs http://localhost:15001/ --node http://localhost:18020/"
8+ "create:test" : " graph create test/arweave-and-3box --node http://localhost:18020/" ,
9+ "deploy:test" : " graph deploy test/arweave-and-3box --ipfs http://localhost:15001/ --node http://localhost:18020/"
1010 },
1111 "devDependencies" : {
1212 "@graphprotocol/graph-cli" : " https://github.com/graphprotocol/graph-cli#master" ,
Original file line number Diff line number Diff line change @@ -10,10 +10,6 @@ const srcDir = path.join(__dirname, "..");
1010const fetchSubgraphs = createApolloFetch ( {
1111 uri : "http://localhost:18030/graphql"
1212} ) ;
13- const fetchSubgraph = createApolloFetch ( {
14- uri :
15- "http://localhost:18000/subgraphs/name/test/overloaded-contract-functions"
16- } ) ;
1713
1814const exec = cmd => {
1915 try {
Original file line number Diff line number Diff line change @@ -6,16 +6,4 @@ contract Contract {
66 constructor () public {
77 emit Trigger ();
88 }
9-
10- function exampleFunction (string memory ) public pure returns (string memory ) {
11- return "string -> string " ;
12- }
13-
14- function exampleFunction (uint256 ) public pure returns (string memory ) {
15- return "uint256 -> string " ;
16- }
17-
18- function exampleFunction (bytes32 ) public pure returns (uint256 ) {
19- return 256 ;
20- }
219}
You can’t perform that action at this time.
0 commit comments