web3py第一课:web3合约交互基础部分
这一篇是正式建立DFarm DAO以来的第一篇文章了,本来这周不准备分享。但是感觉基础的一些知识可以先讲,大家先熟悉一下,所以今天就分享一下web3py跟智能合约交互的一些基础知识。 这部分都是非常简单的代码,希望大家尝试一下。安装python、pycharm这些环境和开发工具大家自行安装即可,网上一搜都是教程,比我写的好很多,这部分内容不再赘述。 web3py文档: https://web3py.readthedocs.io/en/stable/index.html web3py应该是python上跟智能合约交互最好用的包了,首先我们安装一下。 如果你是mac系统,直接使用:`pip install web3` 进行安装。 如果你是windows系统,则需要先装一下c++环境。 下载 vs_buildtools: https://visualstudio.microsoft.com/zh-hant/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16 之后如图安装下面勾选的包,一定要装全,已包含和可选两部分你都要装...
web3py第三课:游戏脚本编写 & 不开源合约调用
终于到了大家心心念念的游戏脚本编写的教程了,今天我会以前段时间比较火的游戏“掰手腕”为例子,来教大家如何写一个游戏脚本。教程无论哪个游戏,我们要写脚本,都是要先进行一下交互,看自己的交互记录来写脚本。 这里我展示一下我的一次fight记录:从这个记录中,我们可以得到很多信息。比如游戏的合约地址、方法名、参数名、参数值。 其实知道这些就可以写脚本了,但是我们还需要ABI才可以进行调用,如果我们打开合约的源代码看到的这是这样:这说明该合约没有开源,所以无法看到合约的源代码,这时候我们要怎么寻找ABI呢?如果你学习过智能合约的一些知识,可能会发现,网站(DAPP)也是通过ABI+web3.js跟智能合约做交互,我们web3py也是一样的道理。所以这些游戏网站都会有ABI来让你调用,也就是说我们去扒一扒网站的源代码即可!通过搜索,在网站的源代码中很容易可以找到。如果JS比较多,需要一个一个看。如果你用safari浏览器可以全局搜索,Chrome好像要一个一个的去找一下。 然后ABI一般都非常长,我们如果只用一个fight方法,完全可以只取这一段:[{"inputs":[{"interna...
Quarter I 2022
原文作者:Ansem(推特@blknoiz06) 原文链接: https://blknoiz06.substack.com/p/quarter-i-2022?token=eyJ1c2VyX2lkIjoxNTEzODUxLCJwb3N0X2lkIjo0NDk3NTUwMywiXyI6Impza3RSIiwiaWF0IjoxNjQxMDAyOTU4LCJleHAiOjE2NDEwMDY1NTgsImlzcyI6InB1Yi0zNDg4NDgiLCJzdWIiOiJwb3N0LXJlYWN0aW9uIn0.Cqy5UR9NIQI5frgMTGectMzDdH_0CF2RZHRcrmNejs4 译者:Evelyn、AluAyi、Henson、Rex|W3.Hitchhiker2022市场整体展望你好!对于我的堕落同胞(fellow degenerates)和其他不知何故闯入这个页面的读者们,我将尝试在这里梳理今年一季度的一些想法。这是我第二次写这样的长篇大论,所以请忍耐一下(哈哈),希望它比从我推特发出来的数百条零零散散的推文更有条理。 2021年对于加密资产来说很显然是突破性的一年,从...
web3py第一课:web3合约交互基础部分
这一篇是正式建立DFarm DAO以来的第一篇文章了,本来这周不准备分享。但是感觉基础的一些知识可以先讲,大家先熟悉一下,所以今天就分享一下web3py跟智能合约交互的一些基础知识。 这部分都是非常简单的代码,希望大家尝试一下。安装python、pycharm这些环境和开发工具大家自行安装即可,网上一搜都是教程,比我写的好很多,这部分内容不再赘述。 web3py文档: https://web3py.readthedocs.io/en/stable/index.html web3py应该是python上跟智能合约交互最好用的包了,首先我们安装一下。 如果你是mac系统,直接使用:`pip install web3` 进行安装。 如果你是windows系统,则需要先装一下c++环境。 下载 vs_buildtools: https://visualstudio.microsoft.com/zh-hant/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16 之后如图安装下面勾选的包,一定要装全,已包含和可选两部分你都要装...
web3py第三课:游戏脚本编写 & 不开源合约调用
终于到了大家心心念念的游戏脚本编写的教程了,今天我会以前段时间比较火的游戏“掰手腕”为例子,来教大家如何写一个游戏脚本。教程无论哪个游戏,我们要写脚本,都是要先进行一下交互,看自己的交互记录来写脚本。 这里我展示一下我的一次fight记录:从这个记录中,我们可以得到很多信息。比如游戏的合约地址、方法名、参数名、参数值。 其实知道这些就可以写脚本了,但是我们还需要ABI才可以进行调用,如果我们打开合约的源代码看到的这是这样:这说明该合约没有开源,所以无法看到合约的源代码,这时候我们要怎么寻找ABI呢?如果你学习过智能合约的一些知识,可能会发现,网站(DAPP)也是通过ABI+web3.js跟智能合约做交互,我们web3py也是一样的道理。所以这些游戏网站都会有ABI来让你调用,也就是说我们去扒一扒网站的源代码即可!通过搜索,在网站的源代码中很容易可以找到。如果JS比较多,需要一个一个看。如果你用safari浏览器可以全局搜索,Chrome好像要一个一个的去找一下。 然后ABI一般都非常长,我们如果只用一个fight方法,完全可以只取这一段:[{"inputs":[{"interna...
Quarter I 2022
原文作者:Ansem(推特@blknoiz06) 原文链接: https://blknoiz06.substack.com/p/quarter-i-2022?token=eyJ1c2VyX2lkIjoxNTEzODUxLCJwb3N0X2lkIjo0NDk3NTUwMywiXyI6Impza3RSIiwiaWF0IjoxNjQxMDAyOTU4LCJleHAiOjE2NDEwMDY1NTgsImlzcyI6InB1Yi0zNDg4NDgiLCJzdWIiOiJwb3N0LXJlYWN0aW9uIn0.Cqy5UR9NIQI5frgMTGectMzDdH_0CF2RZHRcrmNejs4 译者:Evelyn、AluAyi、Henson、Rex|W3.Hitchhiker2022市场整体展望你好!对于我的堕落同胞(fellow degenerates)和其他不知何故闯入这个页面的读者们,我将尝试在这里梳理今年一季度的一些想法。这是我第二次写这样的长篇大论,所以请忍耐一下(哈哈),希望它比从我推特发出来的数百条零零散散的推文更有条理。 2021年对于加密资产来说很显然是突破性的一年,从...
Subscribe to ourens.eth
Subscribe to ourens.eth
<100 subscribers
<100 subscribers
Share Dialog
Share Dialog
My father was a self-taught mandolin player. He was one of the best string instrument players in our town. He could not read music, but if he heard a tune a few times, he could play it. When he was younger, he was a member of a small country music band. They would play at local dances and on a few occasions would play for the local radio station. He often told us how he had auditioned and earned a position in a band that featured Patsy Cline as their lead singer. He told the family that after he was hired he never went back. Dad was a very religious man. He stated that there was a lot of drinking and cursing the day of his audition and he did not want to be around that type of environment.
Occasionally, Dad would get out his mandolin and play for the family. We three children: Trisha, Monte and I, George Jr., would often sing along. Songs such as the Tennessee Waltz, Harbor Lights and around Christmas time, the well-known rendition of Silver Bells. "Silver Bells, Silver Bells, its Christmas time in the city" would ring throughout the house. One of Dad's favorite hymns was "The Old Rugged Cross". We learned the words to the hymn when we were very young, and would sing it with Dad when he would play and sing. Another song that was often shared in our house was a song that accompanied the Walt Disney series: Davey Crockett. Dad only had to hear the song twice before he learned it well enough to play it. "Davey, Davey Crockett, King of the Wild Frontier" was a favorite song for the family. He knew we enjoyed the song and the program and would often get out the mandolin after the program was over. I could never get over how he could play the songs so well after only hearing them a few times. I loved to sing, but I never learned how to play the mandolin. This is something I regret to this day.
Dad loved to play the mandolin for his family he knew we enjoyed singing, and hearing him play. He was like that. If he could give pleasure to others, he would, especially his family. He was always there, sacrificing his time and efforts to see that his family had enough in their life. I had to mature into a man and have children of my own before I realized how much he had sacrificed.
I joined the United States Air Force in January of 1962. Whenever I would come home on leave, I would ask Dad to play the mandolin. Nobody played the mandolin like my father. He could touch your soul with the tones that came out of that old mandolin. He seemed to shine when he was playing. You could see his pride in his ability to play so well for his family.
When Dad was younger, he worked for his father on the farm. His father was a farmer and sharecropped a farm for the man who owned the property. In 1950, our family moved from the farm. Dad had gained employment at the local limestone quarry. When the quarry closed in August of 1957, he had to seek other employment. He worked for Owens Yacht Company in Dundalk, Maryland and for Todd Steel in Point of Rocks, Maryland. While working at Todd Steel, he was involved in an accident. His job was to roll angle iron onto a conveyor so that the welders farther up the production line would have it to complete their job. On this particular day Dad got the third index finger of his left hand mashed between two pieces of steel. The doctor who operated on the finger could not save it, and Dad ended up having the tip of the finger amputated. He didn't lose enough of the finger where it would stop him picking up anything, but it did impact his ability to play the mandolin.
After the accident, Dad was reluctant to play the mandolin. He felt that he could not play as well as he had before the accident. When I came home on leave and asked him to play he would make excuses for why he couldn't play. Eventually, we would wear him down and he would say "Okay, but remember, I can't hold down on the strings the way I used to" or "Since the accident to this finger I can't play as good". For the family it didn't make any difference that Dad couldn't play as well. We were just glad that he would play. When he played the old mandolin it would carry us back to a cheerful, happier time in our lives. "Davey, Davey Crockett, King of the Wild Frontier", would again be heard in the little town of Bakerton, West Virginia.
In August of 1993 my father was diagnosed with inoperable lung cancer. He chose not to receive chemotherapy treatments so that he could live out the rest of his life in dignity. About a week before his death, we asked Dad if he would play the mandolin for us. He made excuses but said "okay". He knew it would probably be the last time he would play for us. He tuned up the old mandolin and played a few notes. When I looked around, there was not a dry eye in the family. We saw before us a quiet humble man with an inner strength that comes from knowing God, and living with him in one's life. Dad would never play the mandolin for us again. We felt at the time that he wouldn't have enough strength to play, and that makes the memory of that day even stronger. Dad was doing something he had done all his life, giving. As sick as he was, he was still pleasing others. Dad sure could play that Mandolin!
My father was a self-taught mandolin player. He was one of the best string instrument players in our town. He could not read music, but if he heard a tune a few times, he could play it. When he was younger, he was a member of a small country music band. They would play at local dances and on a few occasions would play for the local radio station. He often told us how he had auditioned and earned a position in a band that featured Patsy Cline as their lead singer. He told the family that after he was hired he never went back. Dad was a very religious man. He stated that there was a lot of drinking and cursing the day of his audition and he did not want to be around that type of environment.
Occasionally, Dad would get out his mandolin and play for the family. We three children: Trisha, Monte and I, George Jr., would often sing along. Songs such as the Tennessee Waltz, Harbor Lights and around Christmas time, the well-known rendition of Silver Bells. "Silver Bells, Silver Bells, its Christmas time in the city" would ring throughout the house. One of Dad's favorite hymns was "The Old Rugged Cross". We learned the words to the hymn when we were very young, and would sing it with Dad when he would play and sing. Another song that was often shared in our house was a song that accompanied the Walt Disney series: Davey Crockett. Dad only had to hear the song twice before he learned it well enough to play it. "Davey, Davey Crockett, King of the Wild Frontier" was a favorite song for the family. He knew we enjoyed the song and the program and would often get out the mandolin after the program was over. I could never get over how he could play the songs so well after only hearing them a few times. I loved to sing, but I never learned how to play the mandolin. This is something I regret to this day.
Dad loved to play the mandolin for his family he knew we enjoyed singing, and hearing him play. He was like that. If he could give pleasure to others, he would, especially his family. He was always there, sacrificing his time and efforts to see that his family had enough in their life. I had to mature into a man and have children of my own before I realized how much he had sacrificed.
I joined the United States Air Force in January of 1962. Whenever I would come home on leave, I would ask Dad to play the mandolin. Nobody played the mandolin like my father. He could touch your soul with the tones that came out of that old mandolin. He seemed to shine when he was playing. You could see his pride in his ability to play so well for his family.
When Dad was younger, he worked for his father on the farm. His father was a farmer and sharecropped a farm for the man who owned the property. In 1950, our family moved from the farm. Dad had gained employment at the local limestone quarry. When the quarry closed in August of 1957, he had to seek other employment. He worked for Owens Yacht Company in Dundalk, Maryland and for Todd Steel in Point of Rocks, Maryland. While working at Todd Steel, he was involved in an accident. His job was to roll angle iron onto a conveyor so that the welders farther up the production line would have it to complete their job. On this particular day Dad got the third index finger of his left hand mashed between two pieces of steel. The doctor who operated on the finger could not save it, and Dad ended up having the tip of the finger amputated. He didn't lose enough of the finger where it would stop him picking up anything, but it did impact his ability to play the mandolin.
After the accident, Dad was reluctant to play the mandolin. He felt that he could not play as well as he had before the accident. When I came home on leave and asked him to play he would make excuses for why he couldn't play. Eventually, we would wear him down and he would say "Okay, but remember, I can't hold down on the strings the way I used to" or "Since the accident to this finger I can't play as good". For the family it didn't make any difference that Dad couldn't play as well. We were just glad that he would play. When he played the old mandolin it would carry us back to a cheerful, happier time in our lives. "Davey, Davey Crockett, King of the Wild Frontier", would again be heard in the little town of Bakerton, West Virginia.
In August of 1993 my father was diagnosed with inoperable lung cancer. He chose not to receive chemotherapy treatments so that he could live out the rest of his life in dignity. About a week before his death, we asked Dad if he would play the mandolin for us. He made excuses but said "okay". He knew it would probably be the last time he would play for us. He tuned up the old mandolin and played a few notes. When I looked around, there was not a dry eye in the family. We saw before us a quiet humble man with an inner strength that comes from knowing God, and living with him in one's life. Dad would never play the mandolin for us again. We felt at the time that he wouldn't have enough strength to play, and that makes the memory of that day even stronger. Dad was doing something he had done all his life, giving. As sick as he was, he was still pleasing others. Dad sure could play that Mandolin!
No activity yet